<template>
  <div class="app-container no-inherit">

    <el-tabs v-model="editableTabsValue" type="card" @tab-remove="removeTab" @tab-click="changeTab(editableTabsValue)">
      <el-tab-pane class="no-inherit" type="border-card" label="检查列表" name="defaultTab">
        <div style="height: 1200px;" class="container-parent1">
          <el-form
            v-model="TabPtdetailTailPatientVO"
            :inline="true"
            class="demo-form-inline no-inherit"
            label-position="right"
            style=" margin: 10px 10px 30px 270px !important; max-width: 1000px !important;"
          >
            <!-- 在屏幕折半时的布局调整过于麻烦 -->
            <!-- 解决方法1:不处理 -->
            <!-- 解决方法2:响应式布局 -->
            <el-row class="no-inherit " style="display: flex; justify-content: center;" >

              <div class="no-inherit" style="display: flex; gap: 1px;margin: 10px auto!important; max-width: 500px !important ">
                <el-row class="no-inherit" style="display: flex; flex-direction: column; margin-left:-200px !important; width: 230px; margin-right: 35px !important">
                  <el-col class="no-inherit" :span="12" style="margin-bottom:-15px">
                    <el-form-item class="no-inherit">
                      <div class="no-inherit" style="display: flex; align-items: center; ">
                        <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 45px;">患者ID</span>
                        <el-input
                          v-model="TabPtdetailTailPatientVO.patientId"
                          class="no-inherit"
                          oninput="if(value>1000000000000000000)value=1000000000000000000;if(value.length>15)value=value.slice(0,15);if(value<0)value=0"
                          onkeyup="this.value=this.value.replace(/\D/g,'')"
                          style="width: 130px;"
                        />
                      </div>
                    </el-form-item>
                  </el-col>

                  <el-col class="no-inherit" :span="24" style="margin-bottom:-15px">
                    <el-form-item class="no-inherit">
                      <div class="no-inherit" style="display: flex; align-items: center;">
                        <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 45px;">姓 名</span>
                        <el-input v-model="TabPtdetailTailPatientVO.ptName" class="no-inherit" style="width: 130px;" />
                      </div>
                    </el-form-item>
                  </el-col>

                  <el-col class="no-inherit" :span="24" style="margin-bottom:-15px">
                    <el-form-item>
                      <div class="no-inherit" style="display: flex; align-items: center;">
                        <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 45px;">检查号</span>
                        <el-input
                          v-model="TabPtdetailTailPatientVO.ptdtCheckCode"
                          class="no-inherit"
                          style="width: 130px;  "
                        />
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>

                <div class="no-inherit" style="display: flex; flex-direction: column-reverse; height: 110px; width: 130px; margin-right: 35px !important;">
                  <el-radio-group
                    v-model="changeTime"
                    style="display: flex; flex-direction: column;"
                    @change="changeSelectTime"
                  >
                    <div>
                      <el-radio label="1" style="display: block; width: 100px; height: 25px;">今天</el-radio>
                    </div>
                    <div>
                      <el-radio label="2" style="display: block; width: 100px; height: 25px;">昨天</el-radio>
                    </div>
                    <div>
                      <el-radio label="3" style="display: block; width: 100px; height: 25px;">最近三天</el-radio>
                    </div>
                    <div>
                      <el-radio label="4" style="display: block; width: 100px; height: 25px;">最近四天</el-radio>
                    </div>
                  </el-radio-group>
                </div>

                <div class="no-inherit" style="display: flex; flex-direction: column; width: 258px; margin-right: 35px !important">
                  <el-col class="flex-end no-inherit" :span="4" :xl="4" style="margin-bottom: -15px; width: 217px;">
                    <el-form-item class="no-inherit">
                      <el-select
                        v-model="selectedTimeType"
                        class="no-inherit"
                        clearable
                        placeholder="检查日期"
                        @change="changeTimeType"
                      >
                        <el-option
                          v-for="item in TimeOptions"
                          :key="item"
                          :label="item"
                          :value="item"
                        />
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col class="flex-end no-inherit" :span="4" :xl="4" style="margin-bottom: -15px;">
                    <el-form-item class="no-inherit">
                      <el-date-picker
                        v-model="TabPtdetailTailPatientVO.startTime"
                        class="no-inherit"
                        type="datetime"
                        placeholder="登记开始时间"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        default-time="00:00:00"
                        @change="Reset_Zuijin"
                        style="width: 217px;"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col class="flex-end no-inherit" :span="4" :xl="4">
                    <el-form-item class="no-inherit">
                      <el-date-picker
                        v-model="TabPtdetailTailPatientVO.endTime"
                        class="no-inherit"
                        type="datetime"
                        placeholder="登记结束时间"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        default-time="00:00:00"
                        @change="Reset_Zuijin"
                        style="width: 217px;"
                      />
                    </el-form-item>
                  </el-col>
                </div>

                <div class="no-inherit" style="display:flex; flex-direction: column-reverse; height: 34px; margin-right: 50px !important;" >
                  <el-select
                            v-model="ptdtCheckMachine"
                            class="no-inherit"
                            clearable
                            placeholder="请选择检查设备类型"
                            @change="changeUnitType"
                            style="width: 200px;"
                          >
                            <el-option v-for="item in unitTypeList" :key="item" :label="item" :value="item" />
                          </el-select>
                </div>

                <div class="no-inherit" style="display: flex; flex-direction: column; width: 236px; margin-right: 35px !important">
                  <el-col class="flex-end no-inherit" :span="4" :xl="4" style="margin-bottom: -15px;">
                    <el-form-item class="no-inherit">
                      <div class="no-inherit" style="display: flex; align-items: center;">
                        <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 130px;">检查项目</span>
                        <el-select
                          v-model="ptdtCheckName"
                          class="no-inherit"
                          clearable
                          placeholder="请选择检查项目"
                          @change="changeCheckName"
                        >
                          <el-option v-for="item in checkNameList" :key="item" :label="item" :value="item" />
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>

                  <el-col class="flex-end no-inherit" :span="4" :xl="4" style="margin-bottom: -10px;">
                    <el-form-item class="no-inherit">
                      <div class="no-inherit" style="display: flex; align-items: center;">
                        <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 130px;">检查状态</span>
                        <el-select
                          v-model="ptdtStatus"
                          class="no-inherit"
                          clearable
                          placeholder="请选择状态"
                          @change="changePtdtStatusList"
                        >
                          <el-option
                            v-for="item in ptdtStatusList"
                            :key="item.status"
                            :label="item.statuscn"
                            :value="item.status"
                          />
                        </el-select>
                      </div>
                    </el-form-item>
                  </el-col>
                  <img class="no-inherit" src="" alt="">
                  <el-button class="no-inherit my-report btn-el" style="margin-top: 6px !important;" @click="getMyRept(userName1)">我的报告</el-button>
                </div>

                <div class="no-inherit" style="display: flex; flex-direction: column;">
                  <el-col class="flex-end no-inherit" :span="4" :xl="4" style="margin-bottom: -15px;">
                    <el-form-item class="no-inherit">
                      <el-col class="no-inherit" :span="2">
                        <el-button
                          class="no-inherit"
                          type="default"
                          style="width: 85px;height: 29px;"
                          @click="showAdvancedDialog = true"
                        >高级查询
                        </el-button>
                      </el-col>
                    </el-form-item>

                    <!-- 高级查询 -->
                    <el-dialog
                      class="no-inherit"
                      :visible.sync="showAdvancedDialog"
                      title="高级查询"
                      align-center
                      style="margin-top: 100px !important;"
                    >
                      <!-- 使用 Flex 布局 -->
                      <el-form class="no-inherit" style="display: flex; flex-direction: column;">
                        <!-- 搜索框 -->
                        <el-form-item class="no-inherit" label="内容搜索" style="height: 58px;">
                          <el-input
                            v-model="TabPtdetailTailPatientVO.searchQuery"
                            class="no-inherit"
                            placeholder="请输入搜索关键字"
                            prefix-icon="el-icon-search"
                          />
                        </el-form-item>
                        <el-form-item class="no-inherit" style="height: 150px;">
                          <el-card class="box-card no-inherit">
                            <template #header>
                              <div class="card-header no-inherit">
                                <span class="no-inherit">内容包含在></span>
                              </div>
                            </template>
                            <div class="no-inherit">
                              <span> 病史 -</span>
                              <span> 检查所见 -</span>
                              <span> 检查意见 </span>
                            </div>
                            <template #footer>Footer content</template>
                          </el-card>
                        </el-form-item>
                        <el-form-item class="no-inherit" style="height: 58px;">
                          指定报告时间
                          <el-date-picker
                            v-model="TabPtdetailTailPatientVO.startTime"
                            class="no-inherit"
                            type="datetime"
                            placeholder="开始时间"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            default-time="00:00:00"
                          />
                          至
                          <el-date-picker
                            v-model="TabPtdetailTailPatientVO.endTime"
                            class="no-inherit"
                            type="datetime"
                            placeholder="结束时间"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            default-time="00:00:00"
                          />
                        </el-form-item>
                        <el-form-item class="no-inherit" style="height: 98px;">
                          检查设备类型
                          <el-select
                            v-model="ptdtCheckMachine"
                            class="no-inherit"
                            clearable
                            placeholder="请选择检查设备类型"
                            @change="changeUnitType"
                          >
                            <el-option v-for="item in unitTypeList" :key="item" :label="item" :value="item" />
                          </el-select>
                        </el-form-item>
                        <el-form-item
                          class="no-inherit"
                          style="margin-top: auto; display: flex; justify-content: space-between;"
                        >
                          <el-button
                            class="no-inherit"
                            style="width: 85px;height: 29px;"
                            @click="showAdvancedDialog = false"
                          >关闭
                          </el-button>
                          <el-button
                            class="no-inherit"
                            type="primary"
                            icon="el-icon-search"
                            style="width: 85px;height: 29px;"
                            @click="doSearch()"
                          >查询
                          </el-button>
                        </el-form-item>
                      </el-form>
                    </el-dialog>
                    <!-- 高级查询结束 -->

                    <el-dialog
                      title="问诊"
                      :visible.sync="showWZDialog"
                      width="35%"
                    >
                    <div class="dagInput">
                    <div class="interInput">
                      <h2 class="section-title">临床病史</h2>
                      <el-input
                        v-model="ptdtBgproreadyTxt"
                        class="input-field"
                        placeholder="临床病史"
                        clearable
                        type="textarea"
                        :rows="4"
                      />
                    </div>
                    <div class="interInput">
                      <h2 class="section-title">临床诊断</h2>
                      <el-input
                        v-model="ptdtLcdiagnousTxt"
                        class="input-field"
                        placeholder="临床诊断"
                        clearable
                        type="textarea"
                        :rows="4"
                      />
                    </div>

                  </div>

                      <span slot="footer" class="dialog-footer">
                        <el-button @click="showWZDialog = false" style="padding: 7px;">取 消</el-button>
                        <el-button type="primary" @click="handleConsultation" style="padding: 6px;">确 定</el-button>
                      </span>
                    </el-dialog>

                  </el-col>
                  <el-col class="no-inherit" :span="2">
                    <el-button
                      class="no-inherit"
                      type="default"
                      style="width: 85px;height: 29px; margin-top: 3px !important;"
                      @click="resetData()"
                    >清除条件
                    </el-button>
                  </el-col>
                  <el-col class="no-inherit" :span="2">
                    <el-button
                      class="no-inherit"
                      type="primary"
                      icon="el-icon-search"
                      style="width: 85px;height: 29px; margin-top: 8px !important;"
                      @click="doSearch()"
                    >查询
                    </el-button>
                  </el-col>
                </div>
              </div>
            </el-row>
            <el-row>
              <div class="no-inherit" style="display: flex; padding-left: 300px !important;">
                <div class="pagination-info" style="margin-top: 6px !important; margin-right: 8px !important;">
                  总共: {{ total }} 条
                </div>
                <select v-model="currentPage" @change="changePages" style="margin-top: 6px !important; margin-right: 8px !important;">
                  <option v-for="page in totalPages" :key="page" :value="page">
                    第 {{ page }} 页
                  </option>
                </select>
                <el-pagination
                  class="no-inherit"
                  background
                  :pager-count="5"
                  layout="prev, next"
                  :total="total"
                  :prev-text="prevText"
                  :next-text="nextText"
                  :current-page="currentPage"
                  @prev-click="prevPage"
                  @next-click="nextPage"
                  style="margin-top: 6px !important; margin-right: 8px !important;"
                />
                <el-button
                  class="no-inherit btn-refresh btn-el"
                  style="width: 51px;height: 27px;margin-left: 2px !important; margin-top: 6px !important; margin-right: 8px !important;"
                  @click="refreshPage()"
                >刷新
                </el-button>
                <el-button
                  type="primary"
                  :disabled="!hasSelected"
                  @click="handleClickWenzhen(row)"
                  style="margin-top: 6px !important; margin-right: 8px !important;"
                >
                  问诊
                </el-button>
              </div>
            </el-row>
          </el-form>
          <!--    @row-click="tabIndex"-->
          <!-- 2023/5/7
          1.修改el-table样式 不同的报告状态显示不同颜色
          2.所有列添加了鼠标辅助显示
          3.style部分添加了 禁止换行属性
          4.部分关键信息列添加了最小宽度
        -->
          <div>
            <el-table
              class="container-parent-top"
              :data="list"
              border
              style="width: 100%;"
              height="300"
              highlight-current-row
              :row-class-name="tableRowClassName"
              @row-dblclick="handleRowDoubleClick"
              @selection-change="handleSelectionChange1"
              :selectable="selectableRows"
            >
              <el-table-column
                type="selection"
                width="55"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdeId"
                label="患者信息编号"
                header-align="center"
                align="center"
                width="120"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtStatus"
                label="报告状态"
                header-align="center"
                align="center"
                @click.stop="drawer = true"
              >
                <template slot-scope="scope">
                  <el-ptdtStatus :style="getStatusColor(scope.row.ptdtStatus)">{{ scope.row.ptdtStatus
                  }}
                  </el-ptdtStatus>
                </template>
              </el-table-column>
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtSqdept"
                label="申请科室"
                header-align="center"
                align="center"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptName"
                label="姓名"
                header-align="center"
                align="center"
                min-width="70px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptSex"
                label="性别"
                header-align="center"
                align="center"
                min-width="50px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtInhosCode"
                label="住院号"
                header-align="center"
                align="center"
                min-width="92px"
              />

              <!-- 上传状态 -->
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtInhosCode"
                label="上传状态"
                header-align="center"
                align="center"
                min-width="92px"
              />
              <!-- 年龄 -->
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtAge"
                label="年龄"
                header-align="center"
                align="center"
                min-width="92px"
              />

              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtCheckCode"
                label="检查号"
                header-align="center"
                align="center"
                min-width="70px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtCheckName"
                label="检查项目"
                header-align="center"
                align="center"
                min-width="100px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtBgDoctor"
                label="报告医生"
                header-align="center"
                align="center"
                min-width="80px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtShDoctor"
                label="审核医生"
                header-align="center"
                align="center"
                min-width="92px"
              />

              <!-- 复审 -->
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtShDoctor2"
                label="复审医生"
                header-align="center"
                align="center"
                min-width="92px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtCheckMachine"
                label="检查类型"
                header-align="center"
                align="center"
                min-width="100px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtReportDate"
                label="报告日期"
                header-align="center"
                align="center"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="patientId"
                label="患者ID"
                header-align="center"
                align="center"
                min-width="80px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptTele"
                label="电话"
                header-align="center"
                align="center"
                min-width="80px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtShDate"
                label="审核日期"
                header-align="center"
                align="center"
                min-width="80px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptNamepy"
                label="拼音"
                header-align="center"
                align="center"
                min-width="80px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="ptdtOperDatetime"
                label="登记时间"
                header-align="center"
                align="center"
                min-width="190px"
              />
              <el-table-column
                show-overflow-tooltip="true"
                prop="value"
                label="操作"
                width="130"
                header-align="center"
                align="center"
              >
                <template slot-scope="scope">
                  <div style="display">
                    <el-button
                      type="text"
                      style="text-decoration: ;"
                      @click.stop="edit(scope.row.ptdeId, scope.row.patientId); testLog(scope.row); addTab(scope.row.ptdeId, editableTabsValue);"
                    >编辑
                    </el-button>
                    <!-- @click.stop="edit(scope.row.ptdeId, scope.row.patientId); testLog(scope.row);" -->
                    <el-button
                      type="text"
                      style="text-decoration: underline;"
                      @click.stop="dialogVisible = true; getClassList(scope.row.ptdeId, scope.row.patientId)"
                    >发布
                    </el-button>
                  </div>
                </template>
              </el-table-column>
            </el-table>

            <div class="resize1" title="上下伸缩">
              ^
            </div>

            <el-container style="height: 1000px" class="container-parent-bottom">
              <!-- <div><el-button
                      type="primary"
                      size="medium"
                      @click="printWord()"
                      class="action-button"
                    >
                      打印截图
                    </el-button></div> -->
              <el-aside style="width: 400px; height: 1000px;" class="container-leftt">
                <div class="aside_1">
                  <div
                    class="aside_cnt"
                    style="background-color: #fff; height: 407px; margin-top: 2px !important;overflow-y: scroll; overflow-x: scroll"
                    :data="tableList2"
                  >
                    <el-tree
                      :data="treeData"
                      :props="defaultProps1"
                      @node-click="handleNodeClick"
                    />
                    <el-dialog
                      title="图片展示"
                      :visible.sync="dialogVisible_CheckList"
                      width="30%">
                      <div v-if="imageBase64">
                        <!-- 如果有 Base64 图片数据，展示图片 -->
                        <img :src="imageBase64" alt="图片" style="width: 100%;">
                      </div>
                      <div v-else>
                        <!-- 如果没有图片数据，展示提示信息 -->
                        <p style="text-align: center; color: red;">
                          图片数据为空，请稍后重试。
                        </p>
                      </div>
                      <span slot="footer" class="dialog-footer">
                        <el-button @click="dialogVisible_CheckList = false">关闭</el-button>
                      </span>
                    </el-dialog>
                  </div>
                </div>
                <div class="aside_2" />
              </el-aside>
              <div class="resize2" title="左右伸缩">
                ⋮
              </div>
              <el-container class="cotainer-rightt">
  <!-- 病史 -->
              <el-header>
                <el-container>
                  <el-aside style="width: 750px; padding: 2px;">
                    <el-descriptions title="病史" style="background-color: #c7d1dd; height: 25px;" />
                    <div class="text-item" style="height: 150px;">
                      <span v-html="highlightKeywords(DetailslList.ptdtBgReadyTxt)" />
                    </div>
                  </el-aside>
                  <!-- 随访框 -->
                  <el-aside style="padding: 2px; width: 667px;">
                    <el-descriptions title="随访结果" style="background-color: #c7d1dd; height: 25px;" />
                    <div style="margin-top: 1px; justify-content: space-between; align-items: center;">
                      <div style="display: flex;">
                        <el-radio-group v-model="interview1">
                        <el-radio label="未随访">未随访</el-radio>
                        <el-radio label="无进一步治疗">无进一步治疗</el-radio>
                        <el-radio label="符合">符合</el-radio>
                        <el-radio label="需再次随访">需再次随访</el-radio>
                        <el-radio label="不符合">不符合</el-radio>

                      </el-radio-group>
                      <el-button type="primary" @click="saveRecord" style="margin-left: auto;margin-bottom: 1px; ">保存</el-button>
                      </div>
                      <el-input type="textarea" placeholder="请输入随访记录" v-model="ptdtShsjTxt" rows="8" style="display: block; height: 200px; width: 678px;"/>
                    </div>
                  </el-aside>
                </el-container>
              </el-header>

              <!-- 检查所见和检查意见 -->
              <el-main style="padding-top: 120px;">
                <el-container>
                  <!-- 检查所见 -->
                  <el-aside style="padding: 2px; width: 750px;">
                    <el-descriptions title="检查所见" style="background-color: #c7d1dd; height: 25px;" />
                    <div class="text-item" style="height: 200px; overflow-y: auto">
                      <span v-html="highlightKeywords(DetailslList.ptdtCheckSjTxt)" />
                    </div>
                  </el-aside>
                  <el-main style="padding: 2px; width: 750px;">
                    <el-descriptions title="检查意见" style="background-color: #c7d1dd; height: 25px;" />
                    <div class="text-item" style="height: 200px; overflow-y: auto">
                      <span style="background-color: #fff;" v-html="highlightKeywords(DetailslList.ptdtCheckyjTxt)" />
                    </div>
                  </el-main>
                </el-container>
              </el-main>
            </el-container>
            </el-container>
          </div>

          <el-dialog
            class="xuanxue"
            title="选择学生"
            width="50%"
            :visible.sync="dialogVisible"
            :before-close="handleClose"
          >
            <!--选择班级-->
            <!-- <div class="class-info">
            <el-radio-group class="select-class" v-model="classSekect" @change="changeClass">
              <el-radio-button v-for="(item, index) in classArr" :key="index" :label="item.deptId">{{ item.deptName }}
              </el-radio-button>
            </el-radio-group>
            <div class="student-info"> -->
            <!--选择学生信息 -->
            <!-- <el-checkbox-group v-model="selectedStudent">
                <el-checkbox v-for="(item, index) in StudentList" :key="index" :label="item.userName" values="index">
                </el-checkbox>
              </el-checkbox-group>
            </div>
          </div> -->
            <div>
              <el-tabs v-model="classSekect" type="border-card" @tab-click="handleClick3">
                <el-tab-pane
                  v-for="(classItem, classIndex) in classArr"
                  :name="classItem.deptId"
                  :label="classItem.deptName"
                >

                  <div class="student-info">
                    <!-- <el-checkbox-group v-model="classSekect">
                    <el-checkbox v-for="(item, index) in StudentList" :key="index" :label="item.userName"
                      values="index"></el-checkbox>
                  </el-checkbox-group> -->

                    <el-checkbox-button
                      v-model="checkAll"
                      :indeterminate="isIndeterminate"
                      @change="handleCheckAllChange"
                    >全选
                    </el-checkbox-button>
                    <div style="margin: 15px 0;" />
                    <div class="checkbox-container">
                      <el-checkbox-group v-model="selectedStudent" @change="handleCheckedCitiesChange">
                        <el-checkbox
                          v-for="(item, index) in StudentList"
                          :key="item.userName"
                          :label="item.userName"
                          border
                          size="medium"
                        />
                      </el-checkbox-group>
                    </div>
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>

            <div>
              <template>
                <div class="kejian">
                  <div class="span1">
                    <span class="bold-blue">是否可见：</span>
                  </div>
                  <el-checkbox
                    v-model="checkSee.seeMedicalHistory"
                    label="病史"
                    border
                    true-label="0"
                    false-label="1"
                    @change="changeSee"
                  />
                  <el-checkbox
                    v-model="checkSee.seeCheckOpinion"
                    label="检查意见"
                    border
                    true-label="0"
                    false-label="1"
                    @change="changeSee"
                  />
                  <el-checkbox
                    v-model="checkSee.seeCheckSee"
                    label="检查所见"
                    border
                    true-label="0"
                    false-label="1"
                    @change="changeSee"
                  />
                </div>
              </template>
            </div>
            <span slot="footer" class="dialog-footer">
              <el-button @click="dialogVisible = false">取 消</el-button>
              <el-button type="primary" @click="release()">确 定</el-button>
            </span>
          </el-dialog>
        </div>
      </el-tab-pane>

      <el-tab-pane
        v-for="tab in editableTabs"
        :key="tab.name"
        v-loading="loading"
        :label="tab.content"
        :name="tab.name"
        closable
        style="background-color: #e3eefd;"
        :visible.sync="editDialogVisible"
        :before-close="editHandleClose"
        custom-class="custom-dialog"
        :show-cancel-button="false"
        :show-confirm-button="false"
      >
        <div title="编  辑">
          <div class="container-parent">
            <!-- 左半部分 -->
            <div class="container-parent-left">
              <!-- 信息 -->
              <div style="height: 142.5px; width:80%;margin-left: 20px" :model="PtPatientVo2">
                <!-- 1 -->
                <div style="height: 28.5px;width: 100%;">
                  <div style="width: 175px;height: 28px;float: left;border:0.1px solid #69696a;">
                    <p style="height: 27px;float: left;background-color: #e3eefd;width: 90px;padding: 3px 0;">姓名
                    </p>
                    <input
                      v-model="PtPatientVo2.ptName"
                      type="test"
                      style="width: 125px;height: 27px;padding: 0px;float: left;border: none;"
                    >
                  </div>
                  <div style="width: 220px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 3px 0;">性别
                    </p>
                    <input
                      v-model="PtPatientVo2.ptSex"
                      style="height: 100%;float: left;background-color: white;width: 25px;text-align: left;border: none;"
                    ></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 3px 0;margin-left: 30px">年龄
                    </p>
                    <input
                      v-model="PtPatientVo2.ptdtAge"
                      style="height: 100%;float: left;background-color: white;width: 31px;text-align: left;border: none;"
                    ></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;padding: 3px 0;">岁</p>
                  </div>
                  <div style="width: 220px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 32px;padding: 3px 0;">
                      身高</p>
                    <input
                      v-model="PtPatientVo2.ptdtHeight"
                      style="height: 100%;float: left;background-color: white;width: 45px;text-align: left;margin-left:10px;border: none;"
                    ></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;margin: 0 0px;padding: 3px 0;">
                      cm
                    </p>
                  </div>
                  <div style="width: 278px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 3px 0;">
                      体重</p>
                    <input
                      v-model="PtPatientVo2.ptdtWeight"
                      style="height: 100%;float: left;background-color: white;width: 45px;text-align: left;border:none"
                    ></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;margin: 0 0px;padding: 3px 0;">kg
                    </p>
                  </div>
                </div>
                <!-- 2 -->
                <div style="height: 28.5px;">
                  <div style="width: 175px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;padding: 3px 0;">检查类型
                    </p>
                    <input
                      v-model="PtPatientVo2.ptdtCheckMachine"
                      style="height: 100%;background-color: white;width: 101px;text-align: left;border: none;float: left;"
                    ></input>
                  </div>
                  <div style="width: 440px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 48px;padding: 3px 0;">显像剂
                    </p>
                    <el-select
                      v-model="PtPatientVo2.ptdtXxjTxt"
                      clearable
                      style="height: 100%;float: left;background-color: white;width: 103px;text-align: left;border: none;"
                      @change="changeCheckXxj"
                    >
                      <el-option v-for="item in checkXxjList" :key="item" :label="item" :value="item" />
                    </el-select>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 3px 0;margin-left: 30px">剂量
                    </p>
                    <input
                      v-model="PtPatientVo2.ptdtDosage"
                      style="height: 100%;float: left;background-color: white;width: 31px;text-align: left;border: none;"
                    ></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;padding: 3px 0;">ml</p>
                  </div>
                  <div style="width: 278.5px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <div style="display: flex; align-items: center;">
                      <p style="height: 100%;float: left;background-color: #e3eefd;width: 78px;padding: 3px 0;padding: 3px 0;">
                        检查设备</p>
                      <el-select
                        v-model="PtPatientVo2.ptdtModelName"
                        clearable
                        placeholder="请选择检查设备"
                        style="height: 100%;background-color: white;width: 240px;text-align: left;"
                        @change="changeCheckMachine"
                      >
                        <el-option v-for="item in checkMachineList" :key="item" :label="item" :value="item" />
                      </el-select>
                    </div>
                  </div>
                </div>
                <!-- 3 -->
                <div style="height: 28.5px;">
                  <div style="width: 395px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 48px;padding: 3px 0;">检查号
                    </p>
                    <input
                      v-model="PtPatientVo2.ptdtCheckCode"
                      style="height: 100%;background-color: white;width: 300px;text-align: left;border: none;float: left;"
                    ></input>
                  </div>
                  <div style="width: 498px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <div style="display: flex; align-items: center;">
                      <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;padding: 3px 0;padding: 3px 0;">
                        检查项目</p>
                      <el-select
                        v-model="PtPatientVo2.ptdtCheckName"
                        clearable
                        placeholder="请选择检查项目"
                        style="height: 100%;float: left;background-color: white;width: 277px;text-align: left;border: none;"
                        @change="changeCheckName"
                      >
                        <el-option v-for="item in checkNameList" :key="item" :label="item" :value="item" />
                      </el-select>
                    </div>
                  </div>
                </div>
                <!-- 4 -->
                <div style="height: 28.5px;">
                  <div style="width: 893px;height: 100%;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;padding: 3px 0;">临床诊断
                    </p>
                    <input
                      v-model="PtPatientVo2.ptdtLcdiagnousTxt"
                      style="height: 100%;float: left;background-color: white;width: 626px;text-align: left;border: none;"
                    ></input>
                  </div>
                </div>
                <!-- 5 -->
                <div style="height: 28.5px;">
                  <div style="width: 893px;height: 100%;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 60px;margin-left:3px;padding: 3px 0;">
                      阴阳性</p>
                    <el-radio
                      v-model="PtPatientVo2.ptdtPositiveflag"
                      :label="null"
                      style="float: left;margin-top: 3px;padding: 3px 2px;"
                    >不确定
                    </el-radio>
                    <el-radio
                      v-model="PtPatientVo2.ptdtPositiveflag"
                      label="0"
                      style="float: left;margin-top: 3px;padding: 3px 2px;"
                    >阴性
                    </el-radio>
                    <el-radio
                      v-model="PtPatientVo2.ptdtPositiveflag"
                      label="1"
                      style="float: left;margin-top: 3px;padding: 3px 2px;"
                    >阳性
                    </el-radio>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 40px;margin-left:30px;padding: 3px 0;">
                      血糖</p>
                    <input
                      v-model="PtPatientVo2.ptdtBloodglucose"
                      style="height: 100%;float: left;background-color: white;width: 31px;text-align: left;border: none;"
                    ></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;padding: 3px 0;">mmol/L</p>
                    <div style="height: 100%;float: left;background-color: #e3eefd;margin-left: 30px;">
                      <!-- onmouseover="document.getElementById('otherlist1').style.display='block'" -->
                      <el-dropdown @command="handleCommand">
                        <div style="padding: 3px 0;">
                          <span class="el-dropdown-link" style="padding: 3px 0;">
                            其他<i class="el-icon-arrow-down el-icon--right" />
                          </span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                          <el-dropdown-item command="a">改变检查状态</el-dropdown-item>
                          <el-dropdown-item command="b">修改报告医生</el-dropdown-item>
                          <el-dropdown-item command="c">修改审核医生</el-dropdown-item>
                          <!-- disabled -->
                          <el-dropdown-item command="d">修改复审医生</el-dropdown-item>
                          <!-- divided -->
                        </el-dropdown-menu>
                      </el-dropdown>
                    </div>
                    <p style="height: 100%;float: left;background-color: #e3eefd;margin-left: 30px;color: #808000;">
                      <el-select
                        v-model="qtptdtBranch"
                        clearable
                        style="height: 100%;float: left;width: 100px;text-align: left;border: none;"
                        @change="changeqtptdtBranch;changeBranch()"
                      >
                        <el-option v-for="item in checkBranchList" :key="item" :label="item" :value="item" />
                      </el-select>
                    </p>
                  </div>
                </div>
              </div>
              <!-- 其他el-dialog -->
              <el-dialog
                title="改变检查状态"
                :visible.sync="ztdialogVisible"
                width="25%"
                :before-close="handleClose"
              >
                <div class="no-inherit" style="display: flex; align-items: center;padding-left: 50px;padding-right:50px;width:50%">
                  <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 130px;">检查状态</span>
                  <el-select
                    v-model="qtptdtStatus"
                    class="no-inherit"
                    clearable
                    placeholder="请选择状态"
                    @change="changeqtdtStatus"
                  >
                    <el-option
                      v-for="item in ptdtStatusList"
                      :key="item.status"
                      :label="item.statuscn"
                      :value="item.status"
                    />
                  </el-select>
                </div>
                <span slot="footer" class="dialog-footer">
                  <el-button plain style="width:60px;height:40px" @click="ztdialogVisible = false;resetCheckStatus()">取 消</el-button>
                  <el-button type="primary" style="width:60px;height:40px" @click="ztdialogVisible = false;changeCheckStatus()">确 定</el-button>
                </span>
              </el-dialog>
              <el-dialog
                title="改变报告医生"
                :visible.sync="bgdialogVisible"
                width="25%"
                :before-close="handleClose"
              >
                <div class="no-inherit" style="display: flex; align-items: center;padding-left: 50px;padding-right:50px;width:50%">
                  <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 130px;">报告医生</span>
                  <el-select
                    v-model="qtptdtBgDoctor"
                    class="no-inherit"
                    clearable
                    placeholder="请选择医生"
                    @change="changeqtptdtBgDoctor"
                  >
                    <el-option
                      v-for="item in ptdtBgDoctorList"
                      :key="item"
                      :label="item"
                      :value="item"
                    />
                  </el-select>
                </div>
                <span slot="footer" class="dialog-footer">
                  <el-button plain style="width:60px;height:40px" @click="bgdialogVisible = false;resetBgDoctor()">取 消</el-button>
                  <el-button type="primary" style="width:60px;height:40px" @click="bgdialogVisible = false;changeBgDoctor()">确 定</el-button>
                </span>
              </el-dialog>
              <el-dialog
                title="改变审核医生"
                :visible.sync="shdialogVisible"
                width="25%"
                :before-close="handleClose"
              >
                <div class="no-inherit" style="display: flex; align-items: center;padding-left: 50px;padding-right:50px;width:50%">
                  <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 130px;">审核医生</span>
                  <el-select
                    v-model="qtptdtShDoctor"
                    class="no-inherit"
                    clearable
                    placeholder="请选择状态"
                    @change="changeqtptdtShDoctor"
                  >
                    <el-option
                      v-for="item in ptdtShDoctorList"
                      :key="item"
                      :label="item"
                      :value="item"
                    />
                  </el-select>
                </div>
                <span slot="footer" class="dialog-footer">
                  <el-button plain style="width:60px;height:40px" @click="shdialogVisible = false;resetShDoctor()">取 消</el-button>
                  <el-button type="primary" style="width:60px;height:40px" @click="shdialogVisible = false;changeShDoctor()">确 定</el-button>
                </span>
              </el-dialog>
              <el-dialog
                title="改变复审医生"
                :visible.sync="fsdialogVisible"
                width="25%"
                :before-close="handleClose"
              >
                <div class="no-inherit" style="display: flex; align-items: center;padding-left: 50px;padding-right:50px;width:50%">
                  <span class="no-inherit" style="font-weight: 700; color: #4d5463; width: 130px;">复审医生</span>
                  <el-select
                    v-model="qtptdtShDoctor2"
                    class="no-inherit"
                    clearable
                    placeholder="请选择状态"
                    @change="changeqtptdtShDoctor2"
                  >
                    <el-option
                      v-for="item in ptdtFsDoctorList"
                      :key="item"
                      :label="item"
                      :value="item"
                    />
                  </el-select>
                </div>
                <span slot="footer" class="dialog-footer">
                  <el-button plain style="width:60px;height:40px" @click="fsdialogVisible = false;resetShDoctor2()">取 消</el-button>
                  <el-button type="primary" style="width:60px;height:40px" @click="fsdialogVisible = false;changeShDoctor2()">确 定</el-button>
                </span>
              </el-dialog>

              <!-- table -->
              <div style="height: 40px;border-top: 0.1px solid #d0def1;">
                <div style="height: 40px;float: left; margin-left: 20px">
                  <!-- <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['system:user:add']"
            >新增</el-button> -->
                  <el-button
                    v-show="shouldShowDemo1"
                    v-hasPermi="['system:check:reportExtract']"
                    :disabled="!shouldDisabled1"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reportExtract(PtPatientVo2.ptdeId)"
                  >报告提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo2"
                    v-hasPermi="['system:check:revokeExtraction']"
                    :disabled="!shouldDisabled2"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeExtraction(PtPatientVo2.ptdeId)"
                  >撤销提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo4"
                    v-hasPermi="['system:check:submitExamine']"
                    :disabled="!shouldDisabled3"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="submitExamine(PtPatientVo2.ptdeId)"
                  >提交审核
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo5"
                    v-hasPermi="['system:check:reviewExtract']"
                    :disabled="!shouldDisabled4"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reviewExtract(PtPatientVo2.ptdeId)"
                  >审核提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo6"
                    v-hasPermi="['system:check:revokeReview']"
                    :disabled="!shouldDisabled5"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeReview(PtPatientVo2.ptdeId)"
                  >撤销审核
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo7"
                    v-hasPermi="['system:check:reviewApprove']"
                    :disabled="!shouldDisabled6"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reviewApprove(PtPatientVo2.ptdeId)"
                  >审核通过
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo8"
                    v-hasPermi="['system:check:submitReexamine']"
                    :disabled="!shouldDisabled7"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="submitReexamine(PtPatientVo2.ptdeId)"
                  >提交复审
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo9"
                    v-hasPermi="['system:check:reexamineExtract']"
                    :disabled="!shouldDisabled8"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reexamineExtract(PtPatientVo2.ptdeId)"
                  >复审提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo10"
                    v-hasPermi="['system:check:revokeReexamine']"
                    :disabled="!shouldDisabled9"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeReexamine(PtPatientVo2.ptdeId)"
                  >撤销复审
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo11"
                    v-hasPermi="['system:check:reexamineApprove']"
                    :disabled="!shouldDisabled10"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reexamineApprove(PtPatientVo2.ptdeId)"
                  >复审通过
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo3"
                    v-hasPermi="['system:check:revoke']"
                    :disabled="!shouldDisabled11"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revoke(backnumber)"
                  >撤回
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo30"
                    v-hasPermi="['system:check:revoke']"
                    :disabled="!shouldDisabled12"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeDoctor()"
                  >退回
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo12"
                    v-hasPermi="['system:check:changeReviewer1']"
                    :disabled="!shouldDisabled13"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                  >
                    <el-dropdown trigger="click" :disabled="!shouldDisabled13">
                      <span class="el-dropdown-link">
                        转审<i class="el-icon-arrow-down el-icon--right" />
                      </span>
                      <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item
                          v-for="item in ptdtShDoctorList"
                          :key="item"
                          @click.native="changeReviewer1(item)"
                        >
                          {{ item }}
                        </el-dropdown-item>

                      </el-dropdown-menu>
                    </el-dropdown>
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo13"
                    v-hasPermi="['system:check:changeReviewer2']"
                    :disabled="!shouldDisabled14"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                  >
                    <el-dropdown trigger="click" :disabled="!shouldDisabled14">
                      <span class="el-dropdown-link">
                        转审<i class="el-icon-arrow-down el-icon--right" />
                      </span>
                      <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item
                          v-for="item in ptdtFsDoctorList"
                          :key="item"
                          @click.native="changeReviewer2(item)"
                        >
                          {{ item }}
                        </el-dropdown-item>

                      </el-dropdown-menu>
                    </el-dropdown>
                  </el-button>

                </div>
                <div style="height: 40px;width: 362px;float: right;">
                  <el-button
                    style="width: 58px;height: 100%;margin-right: 2px;border: none;float: left;"
                    @click="onSubmit2()"
                  >保存

                  </el-button>
                  <div style="width: 236px;;height: 100%;float: left;">
                    <el-card class="box-card" style="width: 236px;;height: 100%;overflow-y: scroll;background-color: #b5ffe1;">
                      <div v-for="(item,index) in DoctorAndTime" :key="index" class="text item">
                        {{ DoctorAndTime[index].status +DoctorAndTime[index].doctor +DoctorAndTime[index].time }}
                      </div>
                    </el-card>
                    <!-- <el-table
                      :data="DoctorAndTime"
                      height="140"
                      border
                      style="width: 100%"
                    >
                      <el-table-column
                        prop="status"
                        width="70"
                        height="10"
                        show-header="false"
                      />
                      <el-table-column
                        prop="doctor"
                        width="70"
                        height="10"
                        show-header="false"
                      />
                      <el-table-column
                        prop="time"
                        height="10"
                        show-header="false"
                      />
                    </el-table> -->
                    <!-- {{ DoctorAndTime[0].doctor }} -->
                    <!-- <div style="width: 198px;height: 100%;background-color: #b5ffe1;float: left;" />
                    <div style="width: 38px;height: 100%;float: left;background-color: white;" /> -->
                  </div>
                  <div
                    style="width: 60px;height: 100%;background-color: yellow;color: black;border: none;float: left;padding:10px;font-size:smaller"
                  >
                    {{ checkingStatusItems[0].statuscn }}</div>

                </div>
              </div>

              <!-- content -->
              <div style="width: 100%;margin-top: 1px;">
                <template style="width: 100%;height: 220px;">
                  <!-- <quill-editor
                    ref="myQuillEditor"
                    v-model="content"
                    class="ql-editor"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)"
                  /> -->

                  <!-- <quill-editor
                      ref="myQuillEditor"
                      v-model="content"
                      class="ql-editor"
                      :options="editorOption"
                      @blur="onEditorBlur($event)"
                      @focus="onEditorFocus($event)"
                      @change="onEditorChange($event)"
                    /> -->
                  <!-- <p>123</p> -->

                </template>

                <div style="width: 100%;height: 595px;">
                  <div style="height: 23px;border: 1px solid #d5e2f4;"><strong>
                    <p style="margin-left: 10px;">[病史]</p>
                  </strong></div>
                  <!-- <el-input
                    id="quill"
                    v-model="PtPatientVo2.ptdtBgReadyTxt"
                    style="margin-top: 2px;"
                    type="textarea"
                    :row="5"
                    placeholder="请输入内容"
                    @input="updateEditorContent"
                  /> -->
                  <quill-editor
                    v-model="PtPatientVo2.ptdtBgReadyTxt"
                    class="ql-editor"
                    style="resize: vertical;height: 25%;"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)"
                  />
                  <div style="width:100%;height: 23px;border: 1px solid #d5e2f4;"><strong>
                    <p style="margin-left: 10px;">[检查所见]</p>
                  </strong></div>
                  <!-- <el-input
                    v-model="PtPatientVo2.ptdtCheckSjTxt"
                    :rows="8"
                    style="margin-top: 2px;"
                    type="textarea"
                    placeholder="请输入内容"
                  /> -->
                  <quill-editor
                    v-model="PtPatientVo2.ptdtCheckSjTxt"
                    class="ql-editor"
                    style="resize: vertical;height: 33%;"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)"
                  />
                  <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;"><strong>
                    <p style="margin-left: 10px;">[检查意见]</p>
                  </strong></div>
                  <!-- <el-input
                    v-model="PtPatientVo2.ptdtCheckyjTxt"
                    :rows="11"
                    style="margin-top: 2px;"
                    type="textarea"
                    placeholder="请输入内容"
                  /> -->
                  <quill-editor
                    v-model="PtPatientVo2.ptdtCheckyjTxt"
                    class="ql-editor"
                    style="resize: vertical;height: 38%;"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)"
                  />
                </div>
              </div>
            </div>

            <div class="resize" title="收缩侧边栏">
              ⋮
            </div>
            <!-- 右半部分  style="float: left;width: 443px;height: 833px;position: absolute;left: 1094px;"-->
            <div class="container-parent-right">
              <el-tabs
                v-model="activeName2"
                type="border-card"
                style="background-color: #e3eefd;padding: 0;"
                @tab-click="handleNodeClick2"
              >
                <!-- 历史 -->
                <el-tab-pane label="历史" name="first">
                  <div style="height: 174px;width: 100%;border:0.1px solid #c4d9f3;">

                    <div style="height: 28px;width: 100%;display: flex;justify-content: space-around;">
                      <!-- <input type="text" style="float: left;margin: 3px 6px;border-radius: 2px;border: 0.1px solid; width: 87px;height: 21px;padding-left: 3px;"> -->

                      <!-- <el-dropdown style="float: left;margin: 3px 6px;border-radius: 2px;border: 0.1px solid; width: 85px;height: 21px;padding-left: 3px;background-color: white;">
                          <el-button style="border: none;float: right;">
                            <i class="el-icon-arrow-down el-icon--right" />
                          </el-button>
                          <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item>姓名</el-dropdown-item>
                            <el-dropdown-item>检查号</el-dropdown-item>
                          </el-dropdown-menu>
                        </el-dropdown> -->

                      <el-select
                        id="el-input__inner1"
                        v-model="cxvalue"
                        class="el-input__inner"
                        style="float: left;margin: 3px 0;border-radius: 2px; width: 85px;height: 21px;"
                        @change="changecxvalue"
                      >
                        <el-option
                          v-for="item in cxoptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                          style="margin-top:4px"
                        />
                      </el-select>

                      <input
                        v-model="hisSearchvalue"
                        type="text"
                        style="float: right;margin: 3px 1%;border-radius: 2px;border: 0.1px solid; width: 70%;height: 21px;padding-left: 3px;"
                      >
                      <el-button
                        style="width: 58px;height: 27px;border-radius: 2px;border: 0.1px solid;text-align: center;background-color: #c3d6ed;float: right;"
                        @click="hisDoSearch(cxvalue, hisSearchvalue)"
                      >查询
                      </el-button>

                    </div>

                    <div style="height: 24px;width: 100%;">
                      <span style="float: left;font-size: small;">既往检查：{{ jwchecked }}</span>
                      <span style="float: right;">
                        <el-checkbox
                          v-model="jlchecked"
                          style="color:black;"
                          @change="jlcheck(jlchecked, hisSearchList)"
                        >仅列出与当前检查类型的历史记录</el-checkbox>
                      </span>
                    </div>
                    <!-- 表格1 -->
                    <div style="height: 121px;width: 100%;background-color: #f4f4f4;">
                      <el-table
                        :data="hisSearchList"
                        style="width: 100%;"
                        border
                        :row-key="getRowKey"
                        :height="121"
                        @selection-change="handleSelectionChange"
                        @row-click="handleRowClick"
                      >
                        <!-- @click.native="detailsClick(item.ptdeId)" -->
                        <!-- tableList.slice((currentPage - 1) * pageSize, currentPage * pageSize) -->
                        <el-table-column prop="ptName" label="姓名" min-width="80" />
                        <el-table-column prop="ptSex" label="性别" min-width="80" />
                        <el-table-column prop="ptdtCheckDate" label="检查日期" min-width="100" />
                        <el-table-column prop="ptdtCheckCode" label="检查号" min-width="90" />
                        <el-table-column prop="ptdtCheckName" label="检查项目" min-width="100" />
                        <el-table-column prop="ptBrithday" label="生日" min-width="80" />
                        <el-table-column prop="ptdtCheckMachine" label="检查设备" min-width="100" />
                        <el-table-column prop="ptdtStatus" label="状态" min-width="80" />
                        <el-table-column prop="ptdtBgDoctor" label="报告医生" min-width="100" />
                        <el-table-column prop="ptdtShDoctor" label="审核医生" min-width="100" />
                      </el-table>
                    </div>
                  </div>

                  <div style="height: 137px;;width: 100%;">
                    <!-- 按钮 -->
                    <div style="height: 24px;;width: 100%;margin-top: 2px;">
                      <el-button
                        style="float: left;width: 83px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;"
                      >断层序列
                      </el-button>
                      <el-button
                        style="float: left;width: 65px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;"
                        @click="open"
                      >融合
                      </el-button>
                      <el-button
                        style="float: left;width: 48px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;"
                        @click="append"
                      >对比
                      </el-button>
                      <div
                        style="float: left;width: 72px;height: 24px;background-color: #d6e3f6;border: none;padding: 0 5px;padding-top: 1px;"
                      >
                        <el-checkbox v-model="pzchecked">配准</el-checkbox>
                      </div>
                    </div>
                    <!-- 表格二 -->
                    <div style="height: 121px;width: 100%;background-color: #f4f4f4;">
                      <el-table
                        :data="tableList3.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                        style="width: 100%;"
                        border
                        :row-key="getRowKey"
                        :height="121"
                        @selection-change="handleSelectionChange"
                      >
                        <el-table-column
                          type="selection"
                          width="55"
                          fixed="left"
                          :reserve-selection="true"
                        />
                        <el-table-column prop="seriesNumber" label="序列号" />
                        <el-table-column prop="modality" label="设备" />
                        <el-table-column prop="seriesDescription" label="序列描述" />
                        <el-table-column prop="seriesNumber" label="图像数" />
                        <el-table-column prop="bodyPartExamined" label="检查部位" min-width="200" />
                        <el-table-column prop="seriesPat" label="检查号" min-width="150" />
                        <el-table-column prop="seriesDate" label="采集日期" min-width="150" />
                        <el-table-column prop="seriesTime" label="采集时间" min-width="150" />
                        <el-table-column prop="radionuclideTotalDose" label="剂量(mCi)" />
                        <el-table-column prop="manufacturer" label="设备厂商" min-width="70" />
                        <el-table-column prop="modelName" label="设备型号" min-width="90" />
                      </el-table>
                    </div>
                  </div>

                  <div style="width: 100%;height: 483px;margin-top: 7px;">

                    <div class="tabs1" style="height: 24px;;width: 100%;margin-top: 2px;margin-bottom: 2px;">
                      <button
                        data-tab="baogao"
                        class="sbutton1 active"
                        style="float: left;width: 67px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;font-size: small;text-align: center;padding-top: 2px;color: black;"
                        @click="openTab1('baogao')"
                      >报告内容
                      </button>
                      <!-- <button
                        data-tab="jietu"
                        class="sbutton1"
                        style="float: left;width: 40px;height: 24px;background-color: #a0bce0;border: 0.1px solid #b7cae3;color: #5d7faa;"
                        @click="openTab1('jietu')"
                      >截图
                      </button> -->
                    </div>

                    <div style="height: 459px;;width: 99.5%;border:0.1px solid #c3d5ec">
                      <!-- 报告内容 -->
                      <!-- v-for="(item, index) in HistoryVo2" :key="index" -->
                      <div id="baogao" class="tab1-content active">
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;">
                          <p style="margin-left: 10px;">[临床诊断]</p>
                        </div>
                        <el-input
                          id="quill"
                          v-model="HistoryVo2.ptdtLcdiagnousTxt"
                          :rows="1"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容"
                          @input="updateEditorContent"
                        />
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;">
                          <p style="margin-left: 10px;">[病史]</p>
                        </div>
                        <el-input
                          id="quill"
                          v-model="HistoryVo2.ptdtBgreadyTxt"
                          :rows="3"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容"
                          @input="updateEditorContent"
                        />
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;">
                          <p style="margin-left: 10px;">[检查所见]</p>
                        </div>
                        <el-input
                          v-model="HistoryVo2.ptdtChecksjTxt"
                          :rows="5"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容"
                        />
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;">
                          <p style="margin-left: 10px;">[检查意见]</p>
                        </div>
                        <el-input
                          v-model="HistoryVo2.ptdtCheckyjTxt"
                          :rows="6"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容"
                        />
                      </div>
                      <!-- 截图 -->
                      <div
                        id="jietu"
                        class="tab1-content"
                        style="background-color: black;overflow-y: scroll;width: 100%;height: 100%;"
                      >
                        <el-image
                          v-for="(hisurl, index) in hisurls"
                          :key="index"
                          :src="hisurls[index].path"
                          :class="{ 'highlight': hisurl.selected }"
                          :style="{ width: elimg + '%' }"
                          style="margin: 5px;"
                          @click.native="toggleHighlight(index)"
                        />
                      </div>

                    </div>

                  </div>
                </el-tab-pane>
                <!-- 图像 -->
                <el-tab-pane label="图像" name="second">
                  <!-- <div>
                      <div style="width:100%;height: 24px;margin-top: 2px;">
                        <el-button-group>
                          <el-button v-model="selectAll" style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;" @click="selectAll">全选</el-button>
                          <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;">刷新</el-button>
                          <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;">小图标</el-button>
                        </el-button-group>
                        <div style="float: right;">
                          <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;">删除</el-button>
                          <p style="float: left;margin: 3px;">0/4</p>
                        </div>
                      </div>
                      <div style="width: 100%;height: 805px;background-color: black;overflow-y: scroll;">
                        <div v-for="(url, index) in urls" :key="index" class="image-container">
                          <el-image :src="url" lazy style="width: 30%;margin: 5px;" />
                          <input v-model="urls[index].selected" type="checkbox" style="display: none;">
                        </div>
                      </div>
                    </div> -->

                  <div style="width:100%;height: 24px;margin-top: 2px;">
                    <el-button-group>
                      <el-button
                        style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;"
                        @click.native="selectAllimg()"
                      >全选
                      </el-button>
                      <el-button
                        style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;"
                        @click.native="handleNodeClick2(e)"
                      >刷新
                      </el-button>
                      <label for="fileInput" style="margin-left: 10px; display: inline-block; padding: 0 10px; border: 0.1px solid #b7cae3; height: 24px; line-height: 24px;">
                      <el-upload class="avatar-uploader"
                              action
                              :show-file-list="false"
                              :on-success="handleAvatarSuccess"
                              :before-upload="beforeUpload"
                              ref="upload">
                          <img v-if="imageUrl" :src="imageUrl" class="avatar"></img>
                          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                      </el-upload>
                    </label>
                      <!-- 图片上传 -->
                      <!-- <label for="fileInput" style="margin-left: 10px; display: inline-block; padding: 0 10px; border: 0.1px solid #b7cae3; height: 24px; line-height: 24px;">
                        上传图片
                        <input
                          id="fileInput"
                          type="file"
                          @change="handleFileChange"
                          style="opacity: 0; position: absolute;  cursor: pointer;"
                        >
                      </label> -->
                      <el-button
                        style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;"
                        @click.native="imgchange"
                      >{{ imgbs }}
                      </el-button>

                      <el-button
                      style="float: left;width: 55px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;"
                      @click="printWord()"
                    >
                      打印截图
                    </el-button>
                    </el-button-group>

                    <div style="float: right;">
                      <el-button
                        style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;"
                        @click.native="deleteimg()"
                      >删除
                      </el-button>
                      <p style="float: left;margin: 3px;">{{ selectimgnumber }}/{{ allimgnumber }}
                      </p>
                    </div>
                  </div>
                  <div style="width: 100%; height: 760px; background-color: black; overflow-y: scroll;">
                    <div v-for="(item, index) in urls" :key="index" style="margin: 5px;">
                      <el-image
                        :src="item.path"
                        :class="{ 'highlight': item.selected }"
                        :style="{ width: elimg + '%' }"
                        lazy
                        @click.native="toggleHighlight(index)"
                      />
                      <div style="color: white;">
                        <strong>ID:</strong> {{ item.imageID }} <br />
                        <strong>描述:</strong> {{ item.imageDescription }} <br />
                        <el-button @click="openDescribe(item)">修改描述</el-button>
                      </div>
                    </div>
                    <el-dialog
                        title="修改描述"
                        :visible.sync="openDescribe1"
                        :close-on-click-modal="false"
                        :modal="true"
                        width="700px"
                        class="unique-dialog-style">

                        <div class="input-container">
                          <el-input
                            v-model="newDescription"
                            placeholder="输入新的描述"
                            class="resizable-input"
                            clearable
                            type="textarea"
                            rows="4">
                          </el-input>
                        </div>

                        <span slot="footer" class="unique-footer-style">
                          <el-button
                            @click="openDescribe1 = false"
                            class="unique-cancel-button">取 消</el-button>
                          <el-button
                            type="primary"
                            @click="updateDescription()"
                            class="unique-confirm-button">确 定</el-button>
                        </span>
                      </el-dialog>
                  </div>

                </el-tab-pane>
                <!-- 模板 -->
                <el-tab-pane label="模板" name="third">
                  <!-- class="tabs1" -->
                  <div style="margin-left: 5px;">
                    <!-- data-tab="moban" class="sbutton1 active"  -->
                    <div
                      class="sbutton1 active"
                      style="background-color: #ececec;color: black;text-align: center;border-radius: 1px;padding-top: 2px;"
                    >
                      诊断模板
                    </div>
                  </div>
                  <div style="border:0.1px solid #c4d9f3;height: 770px;margin:0 3px;">
                    <!-- id="moban" class="tab1-content active" -->
                    <div>

                      <div style="width: 100%;height: 244px;padding: 3px 2px;">

                        <div style="height: 24px;width: 100%;margin-bottom: 4px;">
                          <el-button
                            style="width: 48px;height: 23px;float: left;margin-left: 2px;background-color: #bcd0e9;text-align: center;border-radius: 2px;font-size: small;padding-top: 2px;"
                            @click="handleNodeClick2"
                          >刷新
                          </el-button>
                          <el-button
                            style="width: 48px;height: 23px;float: right;margin-left: 2px;background-color: #bcd0e9;text-align: center;border-radius: 2px;font-size: small;padding-top: 2px;"
                            @click="dialogVisible = true"
                          >设置
                          </el-button>
                          <!-- reload1 -->
                          <el-dialog
                            title="模板库设置-诊断模板"
                            :visible.sync="dialogVisible"
                            width="50%"
                            custom-class="custom-dialog"
                            top="15"
                            :before-close="handleClose"
                          >
                            <div style="display: block;height: 40px;margin-bottom: 10px;">
                              <!-- <el-button style="height: 40px;padding: 0 10px;float:left;" @click="() => mbappend(data2)">增加子项目</el-button>
                              <el-button style="height: 40px;padding: 0 10px;float:left;" @click="getCheckedNodes(data)">删除项目</el-button> -->
                              <!-- () => mbremove(node, data) -->
                              <el-button
                                style="height: 40px;padding: 0 10px;float:right;"
                                @click="dialogVisible = false"
                              >关闭
                              </el-button>
                              <!-- <el-button style="height: 40px;padding: 0 10px;float:right;"
                                @click="cns">关闭231</el-button> -->
                              <el-button
                                style="height: 40px;padding: 0 10px;float:left;"
                                @click="mbsave(TemplateInfo3.id, TemplateInfo3.label, TemplateInfo3.libCheckSj, TemplateInfo3.libCheckYj)"
                              >保存
                              </el-button>
                            </div>

                            <div style="display: block;height: 500px;">
                              <div style="width: 50%;height: 100%;float: left;">
                                <div style="height: 7%;background-color: #e3eefd;padding: 8px 15px;">
                                  {{ TemplateInfo3.label }}
                                </div>
                                <div
                                  style="width: 100%;height: 93%;background-color: white;margin: 0 2px;overflow-y: scroll;"
                                >
                                  <!-- <el-tree
                                    :data="data2"
                                    show-checkbox
                                    node-key="id"
                                    default-expand-all
                                    :expand-on-click-node="false"
                                    :props="defaultProps2"
                                    @node-click="getTemplateInfo3"
                                  /> -->
                                  <el-tree
                                    :data="data2"
                                    node-key="id"
                                    default-expand-all
                                    :expand-on-click-node="false"
                                    :props="defaultProps2"
                                    @node-click="getTemplateInfo3"
                                  >
                                    <span slot-scope="{ node, data }" class="custom-tree-node">
                                      <span style="margin-right:15px">{{ node.label }}</span>
                                      <span>
                                        <el-button type="text" size="mini" @click="() => mbappendbox(data)">
                                          <i class="el-icon-circle-plus" />
                                          <!-- <img src="@/assets/images/add-circle.png" alt="" style="height: 15px;padding-top: 3px;margin-left: 15px"> -->
                                        </el-button>
                                        <el-button type="text" size="mini" @click="() => mbremovebox(data)">
                                          <i class="el-icon-delete-solid" />
                                          <!-- <img src="@/assets/images/cancel-circle.png" alt="" style="height: 15px;padding-top: 3px;"> -->
                                        </el-button>
                                      </span>
                                    </span>
                                  </el-tree>
                                </div>
                              </div>
                              <div
                                style="width: 50%;height: 100%;float: right;background-color: #e3eefd;padding: 5px;overflow:hidden;border-radius:1px blue solid;"
                              >
                                <el-form :inline="true" class="demo-form-inline" style="height:35px;">
                                  <div style="float:left;width:40%">
                                    <p style="font-size:small;float:left;padding: 10px 5px;">
                                      适用性别</p>
                                    <el-form-item style="width:50%;float:left">
                                      <el-select v-model="mbgender">
                                        <el-option label="男" value="shanghai" />
                                        <el-option label="女" value="beijing" />
                                        <el-option label="所有" value="all" />
                                      </el-select>
                                    </el-form-item>
                                  </div>
                                  <div style="float:left;width:60%">
                                    <p style="font-size:small;float:left;padding: 10px 5px;">
                                      标题
                                    </p>
                                    <el-form-item style="width:70%;float:left">
                                      <el-input v-model="TemplateInfo3.label" />
                                    </el-form-item>
                                  </div>
                                </el-form>
                                <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:8px;">
                                  检查所见</p>
                                <el-input
                                  v-model="TemplateInfo3.libCheckSj"
                                  :rows="12"
                                  style="width: 100%;background-color: white;margin: 0 2px;"
                                  type="textarea"
                                />
                                <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:8px;">
                                  检查意见</p>
                                <el-input
                                  v-model="TemplateInfo3.libCheckYj"
                                  :rows="6"
                                  style="width: 100%;background-color: white;margin: 0 2px;"
                                  type="textarea"
                                />
                                <!-- <div style="margin-top:12px;">
                                    <p style="text-align: center;font-size: small;margin-bottom: 2px;">检查所见</p>
                                    <div style="width: 426px;height: 279px;background-color: white;margin: 0 2px;" @click="getTemplateInfo2a">{{ TemplateInfo2.libCheckSj }}</div>
                                  </div>

                                  <div style="margin-top:12px;">
                                    <p style="text-align: center;font-size: small;margin-bottom: 2px;">检查意见</p>
                                    <div style="width: 426px;height: 148px;background-color: white;margin: 0 2px;" @click="getTemplateInfo2b">{{ TemplateInfo2.libCheckYj }}</div>
                                  </div> -->
                              </div>
                            </div>

                            <div style="display:none;">
                              <span>这是一段信息</span>
                              <span slot="footer" class="dialog-footer">
                                <el-button @click="dialogVisible = false">取
                                  消</el-button>
                                <el-button type="primary" @click="dialogVisible = false">确
                                  定</el-button>
                              </span>
                            </div>
                          </el-dialog>
                        </div>

                        <div
                          style="width: 100%;height: 217px;background-color: white;margin: 0 2px;overflow-y: scroll;"
                        >
                          <el-tree :data="data2" :props="defaultProps2" @node-click="getTemplateInfo2" />
                        </div>

                      </div>

                      <div style="">

                        <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:12px;">
                          检查所见</p>
                        <el-input
                          v-model="TemplateInfo2.libCheckSj"
                          :rows="12"
                          style="width: 100%;background-color: white;margin: 0 2px;"
                          type="textarea"
                          @click.native="getTemplateInfo2a"
                        />
                        <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:12px;">
                          检查意见</p>
                        <el-input
                          v-model="TemplateInfo2.libCheckYj"
                          :rows="9"
                          style="width: 100%;background-color: white;margin: 0 2px;"
                          type="textarea"
                          @click.native="getTemplateInfo2b"
                        />
                      </div>

                    </div>

                  </div>

                  <div style="height:20px;margin-left: 5px;margin-top: 5px;">
                    <!-- <button style="width: 10px;height: 10px;float: left;margin-top: 6px;" />
                  <p style="font-size: small;margin-top: 2px;margin-left: 4px;float: left;">默认展开所有节点</p>
                  <p style="font-size: small;margin-top: 2px;margin-left: 12px;float: left;">内容字体放大率%</p> -->
                  </div>
                </el-tab-pane>
                <!-- 序列 -->
                <el-tab-pane label="序列" name="fourth">
                  <div style="height: 100%;width: 100%;padding: 40px 0;">
                    <!-- 表格1 -->
                    <div style="height: 241px;width: 100%;background-color: #f4f4f4;">
                      <div style="height: 100%;width: 100%;background-color: #f4f4f4;">
                        <div>
                          <div style="width: 100%;height: 241px;background-color: white;">
                            <el-table
                              :data="tableList.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                              style="width: 100%;"
                              :row-key="getRowKey"
                              :height="241"
                              @selection-change="handleSelectionChange"
                            >
                              <el-table-column prop="ptdtCheckCode" label="检查号" min-width="150" />
                              <el-table-column prop="seriesDescription" label="检查描述" min-width="150" />
                              <el-table-column prop="ptdtName" label="姓名" min-width="100" />
                              <el-table-column prop="ptdtAge" label="年龄" />
                              <el-table-column prop="ptdtCheckDate2" label="检查日期" min-width="100" />
                              <el-table-column prop="ptdtCheckDate3" label="检查时间" min-width="100" />
                              <el-table-column prop="ptdtCheckMachine" label="检查类型" min-width="100" />
                            </el-table>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div style="height: 24px;;width: 100%;margin-top: 2px;">
                      <el-button
                        style="float: left;width: 83px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;"
                      >断层序列
                      </el-button>
                      <el-button
                        style="float: left;width: 65px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;"
                        @click="open"
                      >融合
                      </el-button>
                      <el-button
                        style="float: left;width: 48px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;"
                        @click="append"
                      >对比
                      </el-button>
                      <div
                        style="float: left;width: 72px;height: 24px;background-color: #d6e3f6;border: none;padding: 0 5px;padding-top: 1px;"
                      >
                        <el-checkbox v-model="pzchecked">配准</el-checkbox>
                      </div>
                    </div>
                    <!-- 表格二 -->
                    <div style="height: 487px;width: 100%;background-color: #f4f4f4;">
                      <el-table
                        ref="multipleTable"
                        :data="tableList2.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
                        style="width: 100%;"
                        border
                        :row-key="getRowKey"
                        :height="487"
                        @selection-change="handleSelectionChange"
                      >
                        <el-table-column
                          type="selection"
                          width="55"
                          fixed="left"
                          :reserve-selection="true"
                        />
                        <el-table-column prop="seriesNumber" label="序列号" />
                        <el-table-column prop="modality" label="设备" />
                        <el-table-column prop="seriesDescription" label="序列描述" />
                        <el-table-column prop="seriesNumber" label="图像数" />
                        <el-table-column prop="bodyPartExamined" label="检查部位" min-width="200" />
                        <el-table-column prop="seriesPat" label="检查号" min-width="150" />
                        <el-table-column prop="seriesDate" label="采集日期" min-width="150" />
                        <el-table-column prop="seriesTime" label="采集时间" min-width="150" />
                        <el-table-column prop="radionuclideTotalDose" label="剂量(mCi)" />
                        <el-table-column prop="manufacturer" label="设备厂商" min-width="70" />
                        <el-table-column prop="modelName" label="设备型号" min-width="90" />
                      </el-table>
                    </div>

                  </div>
                </el-tab-pane>
                <!-- 打印 -->
                <el-tab-pane label="打印" name="fifth">
                  <div class="button-container">
                    <el-button
                      type="primary"
                      size="small"
                      @click="printTextTemp()"
                      class="action-button"
                      style="padding: 6px 12px; font-size: 14px;"
                    >
                      打印报告
                    </el-button>
                  </div>
                  <div class="content-container">
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </div>
      </el-tab-pane>
    </el-tabs>

  </div>
</template>

<script>

import { quillEditor } from 'vue-quill-editor'

import 'quill/dist/quill.bubble.css'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'

import teacher from '@/api/report/teacher'
// UUID组件
import { v4 as uuidv4 } from 'uuid'

export default {
  components: {
    quillEditor
  },
  data() {
    return {
      imageID_req: '',
      imageDescription_req: '',
      newDescription: '',
      openDescribe1: false,
      radio: null,
      muban1: [],
      ptdt_bgproreadyTxt: '',
      ptdt_lcdiagnousTxt: '',
      selectedRows: [],
      showWZDialog: false,
      // 选择日期类型
      userName1: '', // 我的报告按钮中获取的当前用户名称
      selectedTimeType: '',
      treeData: [], // 树节点
      TimeOptions: [
        '检查日期',
        '报告日期',
        '审核日期'
      ],
      // 检查列表 检查所见检查意见 左边树形控件部分
      defaultProps1: {
        children: 'children',
        label: 'label'
      },
      changeTime: '',
      prevText: '上一页',
      nextText: '下一页',
      showAdvancedDialog: false, // 控制弹窗显示与隐藏的变量
      checkSee: {
        seeMedicalHistory: '1',
        // seeCheckProReady :'1',
        seeCheckOpinion: '1',
        seeCheckSee: '1'
        // seeSurvey:'1',
        // seeCheckReady:'1'
      },
      // 高级查询
      includeMedicalHistory: false,
      includeExamResults: false,
      includeExamOpinions: false,
      // 班级列表
      classSekect: '',
      checkList: [''],
      classArr: [],
      StudentList: [],
      dialogVisible: false,
      DetailslList: {},
      interview1: null, // 绑定单选框的值
      // 模拟从后端获取的数据
      ptdtBgproreadyTxt: '',
      ptdtLcdiagnousTxt: '',
      ptdtShsjTxt: '',
      drawer: false,
      direction: 'rtl',
      // 检查项目集合
      checkNameList: [],
      ptdtCheckName: '',
      checkMachineList: [],
      ptdtStatus: '',
      ptdtStatusList: [],
      unitTypeList: [],
      ptdtCheckMachine: '',
      list: null,
      total: 0,
      studyInsta: null,
      // 病人信息请求实体
      currentSize: 10,
      TabPtdetailTailPatientVO: {
        current: 0,
        currentSize: 10
      },
      studentId: '1111',
      ptdeIds: '',
      dialogVisible_CheckList: false,
      imageBase64: '',
      patientIds: '',
      selectedStudent: [], // 选中的学生

      data: [],
      editDialogVisible: false, // 编辑---弹窗

      // 编辑弹窗
      // 用来存放截图
      activeName2: 'first',
      formInline2: {
        user: '111',
        region: ''
      },
      patientInfo2: {},
      checkNameList2: [],
      checkXxjList: [],
      ptdeId2: '',
      patientId2: '',
      ptdtOperDatetime2: '',
      PtPatientVo2: {},
      PtPatientVo3: {},
      defaultProps2: {
        label: 'label',
        children: 'children'
      },
      hisurl: [],
      hisurls: [],
      // 截图
      imgs: [],
      url: {},
      urls: [],
      //
      data2: [],
      DetailslList2: {},
      Survey2: {},
      HistoryVo2: [],
      TemplateInfo2: {},
      TemplateInfo3: {
        label: ''
      },
      //
      studyInsta2: '',
      tableList: [],
      tableList2: [],
      tableList3: [],
      currentPage: 1,
      pageSize: 14,
      select_num: 0,
      // 选择序列
      studentArr: [],
      checkAll: false,

      isIndeterminate: true,
      select_list: [],

      checkFun: '',
      funs: [
        {
          label: 'PETMR2D',
          value: '1'
        },
        {
          label: 'PETMR3D',
          value: '2'
        },
        {
          label: 'PETCT',
          value: '3'
        },
        {
          label: 'NM2D',
          value: '4'
        },
        {
          label: 'PTFC',
          value: '5'
        }
      ],
      multipleSelection: [],
      activeName: 'first',
      // 状态管理--数组
      trClasses: [{
        name: ['已预约', '已登记', '已报到', '已注射', '采集中', '已采集', '已取消'],
        trClassName: 'initial-row'
      }, {
        name: ['待报告', '报告中', '已报告', '退回'],
        trClassName: 'reports-row'
      }, {
        name: ['待审核', '审核中', '已退回'],
        trClassName: 'audit-ing-row'
      }, {
        name: ['已审核'],
        trClassName: 'audit-end-row'
      }, {
        name: ['待复审', '复审中'],
        trClassName: 'review-ing-row'
      }, {
        name: ['已复审'],
        trClassName: 'review-end-row'
      }],
      show: 0,
      noshow: 1,
      KSJ: '',
      KYJ: '',
      pzchecked: false,
      jlchecked: 0,
      jlcheckedList: [],
      jlcheckedLista: [],
      editableTabsValue: '0',
      editableTabs: [],
      maxTabsAllowed: 3,
      tabIndex: 2,
      dialogVisible: false,
      selectAll: false,
      cxvalue: '',
      cxoptions: [{
        value: '1',
        label: '姓名'
      }, {
        value: '0',
        label: '检查号'
      }],
      hisSearchvalue: '',
      hisSearchList: [],
      id: '',
      mbtitle: '',
      mbgender: '',
      mbsaveList: {},
      mbsaveTxt: '',
      jwchecked: '',
      TabPtdetailTailPatientVO1: {
        current: 0,
        currentSize: 10
      },
      list1: null,
      elimg: 30,
      ptid_Wenzhen: '',
      imgbs: '小图标',
      imgchangeTxt: '',
      deleteimgList: [],
      allimgnumber: '',
      selectimgnumber: 0,
      isHighlighted: false,
      mbappendList: {},
      convertedData: {},
      converteddata: {},
      ztdialogVisible: false,
      bgdialogVisible: false,
      shdialogVisible: false,
      fsdialogVisible: false,
      ptdtBgDoctorList: [],
      ptdtShDoctorList: [],
      ptdtFsDoctorList: [],
      qtptdtStatus: '',
      qtptdtBgDoctor: '',
      qtptdtShDoctor: '',
      qtptdtShDoctor2: '',
      qtptdtBranch: '',
      qtchangetxt: '',
      originalptdtStatus: '',
      originalBgDoctor: '',
      originalShDoctor: '',
      originalShDoctor2: '',
      checkingStatusItems: {},
      bgswitchnum: 0,
      shouldShowDemo1: true,
      shouldShowDemo2: true,
      shouldShowDemo3: true,
      shouldShowDemo30: false,
      shouldShowDemo4: true,
      shouldShowDemo5: true,
      shouldShowDemo6: true,
      shouldShowDemo7: true,
      shouldShowDemo8: true,
      shouldShowDemo9: true,
      shouldShowDemo10: true,
      shouldShowDemo11: true,
      shouldShowDemo12: true,
      shouldShowDemo13: false,
      shouldDisabled1: false,
      shouldDisabled2: false,
      shouldDisabled3: false,
      shouldDisabled4: false,
      shouldDisabled5: false,
      shouldDisabled6: false,
      shouldDisabled7: false,
      shouldDisabled8: false,
      shouldDisabled9: false,
      shouldDisabled10: false,
      shouldDisabled11: false,
      shouldDisabled12: false,
      shouldDisabled13: false,
      shouldDisabled14: false,
      backnumber: 0,
      DoctorAndTime: [{
        status: '',
        doctor: '',
        time: ''
      },
      {
        status: '',
        doctor: '',
        time: ''
      },
      {
        status: '',
        doctor: '',
        time: ''
      }],
      csimglist: [
        {
          'completePath': '/DICK0/202303/0000099350_202105181003/202105181003_04a8dd2c9a084714823314d7532ee8e6.JPG',
          'number': 1
        },
        {
          'completePath': '/DICK0/202303/0000099350_202105181003/202105181003_18b0ed5fc9af41a3a78fc0222e15af5b.JPG',
          'number': 1
        },
        {
          'completePath': '/DICK0/202303/0000099350_202105181003/202105181003_0a9aa90f64364f9382d4e08db7d485ea.JPG',
          'number': 1
        },
        {
          'completePath': '/DICK0/202303/0000099350_202105181003/202105181003_0233e1de78c744a49751c143159d1c86.JPG',
          'number': 1
        },
        {
          'completePath': '/DICK0/202303/0000099380_202107201005/202107201005_b532b406d0784ff8956bc155767e3a59.PNG',
          'number': 1
        }
      ],
      content: `<p>我是富文本编辑器默认的内容！</p>`, // 双向数据绑定数据
      // 富文本编辑器配置
      editorOption: {
        modules: {
          toolbar: [
            ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
            ['blockquote', 'code-block'], // 引用  代码块
            [{ header: 1 }, { header: 2 }], // 1、2 级标题
            [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
            [{ script: 'sub' }, { script: 'super' }], // 上标/下标
            [{ indent: '-1' }, { indent: '+1' }], // 缩进
            [{ direction: 'rtl' }], // 文本方向
            [{ size: ['12px', false, '16px', '18px', '20px', '30px'] }], // 字体大小
            [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
            [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
            [{ font: [false, 'SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial'] }] // 字体种类
            // [{ align: [] }], // 对齐方式
            // ['clean'], // 清除文本格式
            // ['link', 'image', 'video'] // 链接、图片、视频
          ]
        },
        placeholder: '请输入正文'
      }
    }
  },
  mounted() {
    this.openTab('history')
    this.$axios.get('http://120.27.23.108:8080/report/teacher/getDropDownCheckMachine').then(res => {
      console.log(res.data)
    })
    this.treeRef = this.$refs.tree
    this.getDoctorAndTime(this.PtPatientVo2.ptdeId)
    // this.$refs.multipleTable.toggleAllSelection()
    // this.$nextTick(() => {
    //   this.$refs.multipleTable.toggleAllSelection()
    // })
  },
  created() {
    this.getList()
    this.getDropDownCheckName()
    // this.getDropDownCheckMachine()
    this.getDropDownXxj()
    this.getDropDownBranch()
    this.getDropDownModelName()
    this.getDropDownDoctor()
    this.getDropDownState()
    this.getDropDownUnitType()
    this.getLoggerUser()
    this.editableTabsValue = 'defaultTab'
  },
  updated() {
    this.checkDoctor()
    this.buttonShowOrNot()
    this.buttonDisabled()
  },
  computed: {
    hasSelected() {
      if(this.selectedRows.length == 1){
        return 1;
      }else {
        return 0;
      }
    },
    pageSize() {
      return 10; // 每页显示的数据量
    },
    totalPages() {
      return Math.ceil(this.total / 10); // 计算总页数
    }
  },
  methods: {
    updateDescription() {
      const data = {
        imageID: this.imageID_req,
        imageDescription: this.newDescription
      }
      console.log(data);

      teacher.changeImgDes(data).then(res => {
        setTimeout(() => {
          this.$message.success("修改成功！")
          this.openDescribe1 = false;
        }, 200);
      }).catch(error => {
        this.$message.error("修改失败！")
        this.openDescribe1 = false;
        }
      )
      this.handleNodeClick2()

    },
    openDescribe(item) {
      console.log(item);
      this.imageDescription_req = item.imageDescription
      this.imageID_req = item.imageID
      this.newDescription = item.imageDescription; // 设定新的描述为当前项的描述
      this.currentIndex = this.urls.indexOf(item); // 记录当前项的索引
      this.openDescribe1 = true; // 打开弹窗
    },
    handleClickWenzhen(row) {
    this.showWZDialog = true;
  },
    wenzhen(row){
      console.log(row.ptdeId);

    },
    //上传图片成功后回调
    handleAvatarSuccess (response, file, fileList) {
          },
    //上传图片前回调函数
    beforeUpload(file) {
      if (file) {
        const suffix = file.name.split('.').pop().toLowerCase(); // 获取文件后缀并转换为小写
        const sizeLimitMB = 10; // 设置新的文件大小限制 (10MB)
        const fileSizeMB = file.size / 1024 / 1024; // 将文件大小转换为 MB

        if (['png', 'jpeg', 'jpg'].indexOf(suffix) < 0) {
          this.$message.error('上传图片只支持 png、jpeg、jpg 格式！');
          this.$refs.upload.clearFiles();
          return false;
        }
        if (fileSizeMB > sizeLimitMB) {
          this.$message.error(`上传文件大小不能超过 ${sizeLimitMB}MB!`);
          return false;
        }

        const formData = new FormData();
        formData.append('file', file);
        formData.append('ptdeid', this.ptdeId2);

        console.log(formData);


        teacher.uploadImage(formData);
        setTimeout(() => {
          this.$message.success('上传成功!')

        this.handleNodeClick2()
      }, 100)
      }
    },

    handleSelectionChange1(selectedRows) {
      this.selectedRows = selectedRows
      if (this.selectedRows.length > 0) {
      const selectedRow = selectedRows[0]; // 获取第一个选中的行
      this.ptid_Wenzhen = selectedRow.ptdeId
    }
      teacher.getInterview(this.ptid_Wenzhen).then(res => {

        console.log(res.data);

        this.ptdtBgproreadyTxt = res.data.ptdtBgproreadyTxt
        this.ptdtLcdiagnousTxt = res.data.ptdtLcdiagnousTxt
        }).catch(error => {

        })
    },
    handleConsultation() {
        // 这里可以执行实际的问诊逻辑
        this.dialogVisible1 = true;
        const data = {
          ptdeid: this.ptid_Wenzhen,
          ptdtBgproreadyTxt: this.ptdtBgproreadyTxt,
          ptdtLcdiagnousTxt: this.ptdtLcdiagnousTxt
        }
        teacher.serveInterview(data).then(
          this.showWZDialog = false,
        ).catch()
        setTimeout(() => {
          this.$message.success("保存成功！")
        }, 200);
    },
    handleDialogClose() {
      // 清理或处理关闭弹窗后的逻辑
    },
    selectableRows(row) {
      return true;  // 默认所有行都可以被选择
    },

    saveRecord() {
      if(this.ptdeId2 == ''){
        this.$message.error("请双击进行预览后再保存")
        return 1;
      }
        const data = {
        surPtdeid: this.ptdeId2,
        followTag: this.interview1,
        followResult: this.ptdtShsjTxt
      }
      teacher.serveFollow(data)
      .then(response => {
        this.$message.success("保存成功！")
        // 处理成功逻辑
      })
      .catch(error => {
      });

    },

    // handleFileChange(event) {
    //   const file = event.target.files[0];
    //   if (file) {
    //     const reader = new FileReader();
    //     reader.readAsDataURL(file);  // 将文件读取为base64
    //     reader.onload = () => {
    //       const base64Data = reader.result;
    //       this.uploadToServer(base64Data);
    //     };
    //   }
    // },

    // uploadToServer(base64Data){
    //   const data = {
    //     file: base64Data,
    //     ptdeid: this.ptdeId2,
    //     opid: 1
    //   };

    //   console.log(data);

    //   teacher.uploadImage(data);
    // },

    //打印报告模板
    printTextTemp(){
      teacher.printTextTemplate(this.ptdeId2).then(res => {
        this.$message.success(res.msg)
      })
    },

    //打印图像模板
    printWord(){
      console.log(this.ptdeId2);
      this.urls.forEach((url) => {
        if (url.selected === true) {
          // this.imgchangeTxt= 'http://172.20.128.6:8089/api/tspet/imagesMap?StudyInsta=' +url.path
          this.deleteimgList.push(url.imageID)
        }
      })
    const data = {
    ptdeid: this.ptdeId2,
    imageIdList: this.deleteimgList
  };

    teacher.printWord(data).then(res => {
      this.$message.success(res.msg)
    })
    },

    triggerFileInput() {
    this.$refs.fileInput.click()
  },

    // 获取当前登录用户的用户名
    getLoggerUser() {
      var userName1 = this.$store.state.user.name
      // console.log(userName1)
    },
    dragControllerDiv1() {
      // console.log('触发事件')
      const resize = document.getElementsByClassName('resize1')
      const top = document.getElementsByClassName('container-parent-top')
      const bottom = document.getElementsByClassName('container-parent-bottom')
      const box = document.getElementsByClassName('container-parent1')

      for (let i = 0; i < resize.length; i++) {
        // console.log('鼠标按下了')
        // 鼠标按下事件
        resize[i].onmousedown = function(e) {
          // 颜色改变提醒
          resize[i].style.background = '#818181'

          // 记录初始鼠标位置的Y坐标
          const startY = e.clientY
          const initialTopHeight = top[0].clientHeight
          const initialBottomHeight = bottom[0].clientHeight

          // 鼠标拖动事件
          document.onmousemove = function(e) {
            const endY = e.clientY
            const moveLen = initialTopHeight + (endY - startY) // 计算移动距离

            const maxHeight = box[0].clientHeight - resize[i].offsetHeight - 10
            const minHeight = 0

            if (moveLen >= minHeight && moveLen <= maxHeight) {
              top[0].style.height = moveLen + 'px'
              bottom[0].style.height = (box[0].clientHeight - moveLen - resize[i].offsetHeight) + 'px'
            }
          }

          // 鼠标松开事件
          document.onmouseup = function() {
            // 颜色恢复
            resize[i].style.background = '#d6d6d6'
            document.onmousemove = null
            document.onmouseup = null
          }

          return false
        }
      }
    },

    dragControllerDiv2() {
      // console.log('触发事件')
      var resize = document.getElementsByClassName('resize2')
      var left = document.getElementsByClassName('container-leftt')
      var mid = document.getElementsByClassName('container-rightt')
      var box = document.getElementsByClassName('container-parent-bottom')
      for (let i = 0; i < resize.length; i++) {
        // console.log('鼠标按下了')
        // 鼠标按下事件
        resize[i].onmousedown = function(e) {
          // 颜色改变提醒
          resize[i].style.background = '#818181'
          var startX = e.clientX
          resize[i].left = resize[i].offsetLeft
          // 鼠标拖动事件
          document.onmousemove = function(e) {
            var endX = e.clientX
            var moveLen = resize[i].left + (endX - startX) // （endx-startx）=移动的距离。resize[i].left+移动的距离=左边区域最后的宽度
            var maxT = box[i].clientWidth - resize[i].offsetWidth // 容器宽度 - 左边区域的宽度 = 右边区域的宽度

            // if (moveLen < 32) moveLen = 32; // 左边区域的最小宽度为32px
            // if (moveLen > maxT - 150) moveLen = maxT - 150; //右边区域最小宽度为150px

            resize[i].style.left = moveLen // 设置左侧区域的宽度

            for (let j = 0; j < left.length; j++) {
              left[j].style.width = moveLen + 'px'
              mid[j].style.width = (box[i].clientWidth - moveLen - 10) + 'px'
            }
          }
          // 鼠标松开事件
          document.onmouseup = function(evt) {
            // 颜色恢复
            resize[i].style.background = '#d6d6d6'
            document.onmousemove = null
            document.onmouseup = null
            resize[i].releaseCapture && resize[i].releaseCapture() // 当你不在需要继续获得鼠标消息就要应该调用ReleaseCapture()释放掉
          }
          resize[i].setCapture && resize[i].setCapture() // 该函数在属于当前线程的指定窗口里设置鼠标捕获
          return false
        }
      }
    },

    Reset_Zuijin() {
      this.changeTime = ''
    },
    dragControllerDiv() {
      // console.log('触发事件')
      var resize = document.getElementsByClassName('resize')
      var left = document.getElementsByClassName('container-parent-left')
      var mid = document.getElementsByClassName('container-parent-right')
      var box = document.getElementsByClassName('container-parent')
      for (let i = 0; i < resize.length; i++) {
        // 鼠标按下事件
        resize[i].onmousedown = function(e) {
          // 颜色改变提醒
          resize[i].style.background = '#818181'
          var startX = e.clientX
          resize[i].left = resize[i].offsetLeft
          // 鼠标拖动事件
          document.onmousemove = function(e) {
            var endX = e.clientX
            var moveLen = resize[i].left + (endX - startX) // （endx-startx）=移动的距离。resize[i].left+移动的距离=左边区域最后的宽度
            var maxT = box[i].clientWidth - resize[i].offsetWidth // 容器宽度 - 左边区域的宽度 = 右边区域的宽度

            // if (moveLen < 32) moveLen = 32; // 左边区域的最小宽度为32px
            // if (moveLen > maxT - 150) moveLen = maxT - 150; //右边区域最小宽度为150px

            resize[i].style.left = moveLen // 设置左侧区域的宽度

            for (let j = 0; j < left.length; j++) {
              left[j].style.width = moveLen + 'px'
              mid[j].style.width = (box[i].clientWidth - moveLen - 10) + 'px'
            }
          }
          // 鼠标松开事件
          document.onmouseup = function(evt) {
            // 颜色恢复
            resize[i].style.background = '#d6d6d6'
            document.onmousemove = null
            document.onmouseup = null
            resize[i].releaseCapture && resize[i].releaseCapture() // 当你不在需要继续获得鼠标消息就要应该调用ReleaseCapture()释放掉
          }
          resize[i].setCapture && resize[i].setCapture() // 该函数在属于当前线程的指定窗口里设置鼠标捕获
          return false
        }
      }
    },
    // eslint-disable-next-line vue/no-dupe-keys
    selectOption(option) {
      if (this.selectOption) {
        this.selectOption.getClassList.remove('selected')
      }

      option.getClassList.add('selected')
      this.selectedOption = option
    },
    // 刷新按钮
    refreshPage() {
      // 使用 location.reload() 方法来刷新页面
      location.reload()
    },
    changeshow() {
      this.show = 1
      this.noshow = 0
    },
    changeshow1() {
      this.show = 0
      this.noshow = 1
    },
    // 排序方法
    sortByField(field) {
      return (a, b) => {
        const valueA = a[field]
        const valueB = b[field]

        if (typeof valueA === 'number' && typeof valueB === 'number') {
          return valueA - valueB
        } else if (typeof valueA === 'string' && typeof valueB === 'string') {
          return valueA.localeCompare(valueB)
        } else if (valueA instanceof Date && valueB instanceof Date) {
          return valueA.getTime() - valueB.getTime()
        }
      }
    },

    prevPage() {
      if (this.currentPage > 1) {
        this.currentPage--;
        this.changePages();
      }
    },
    nextPage() {
      if (this.currentPage < this.totalPages) {
        this.currentPage++;
        this.changePages();
      }
    },

    getStatusColor(status) {
      if (['已预约', '已登记', '已报到', '已注射', '采集中', '已采集', '已取消'].includes(status)) {
        return { 'color': '#A9A9A9' }
      } else if (['待报告', '报告中', '已报告', '退回'].includes(status)) {
        return { 'color': '#00FF00' }
      } else if (['待审核', '审核中', '已退回'].includes(status)) {
        return { 'color': '#64b4ff' }
      } else if (['已审核'].includes(status)) {
        return { 'color': '#64b4ff' }
      } else if (['待复审', '复审中'].includes(status)) {
        return { 'color': '#FF7F50' }
      } else {
        return { 'color': '#FF7F50' }
      }
    },
    // el-ui 状态管理回调
    tableRowClassName({ row, rowIndex }) {
      for (const index of this.trClasses) {
        for (const keyString of index.name) {
          if (row.ptdtStatus === keyString) {
            return index.trClassName
          }
        }
      }
    },

    changeSee() {
      console.log(this.checkSee)
    },

    handleClick3() {
      //  console.log(this.classArr[0])
          // console.log(this.classArr[0].deptName)
          // console.log(this.ptdeId)
      this.getStudentList(this.ptdeId)
    },
    // 选择班级
    changeClass(e) {
      this.getStudentList(this.ptdeId)
    },
    handleClick(data, checked, node) {
      if (checked) {
        // 关键
        this.$refs.tree.setCheckedNodes([data])
      }
    },

    // 高亮
    highlightKeywords(text) {
      const keywords = this.TabPtdetailTailPatientVO.searchQuery
      if (keywords && text) {
        const regex = new RegExp(`(${keywords})`, 'gi')
        return text.replace(regex, '<span style="background-color: yellow;">$1</span>')
      }
      return text
    },

    handleCheckAllChange(val) {
      this.selectedStudent = val ? this.studentArr : []
      this.isIndeterminate = false
    },
    handleCheckedCitiesChange(value) {
      const checkedCount = value.length
      this.checkAll = checkedCount === this.studentArr.length
      this.isIndeterminate = checkedCount > 0 && checkedCount < this.studentArr.length
    },

    // 查询班级列表
    getClassList(ptdeId, patientId) {
      teacher.getClassList().then(response => {
        this.classArr = response.data || {}
        this.classSekect = this.classArr[0].deptId || ''
        this.getStudentList(ptdeId)
        this.ptdeIds = ptdeId
        this.patientIds = patientId
      })
    },
    // 查询班级下的学生
    getStudentList(ptdeId) {
      teacher.getStudentList(this.classSekect).then(response => {
        this.StudentList = response.data || {}
        console.log(this.StudentList)
        this.studentArr = this.StudentList.map(item => item.userName)
        console.log(this.studentArr)
      })
    },

    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          this.$nextTick(() => {
            this.checkSee
          })
          done()
        })
        .catch(_ => {
          // console.log("执行了111");
          // this.$nextTick(() =>{
          //     this.checkSee.seeMedicalHistory = '1',
          //     this.checkSee.seeCheckOpinion = '1',
          //     this.checkSee.seeCheckSee = '1'
          //   })
        })
    },
    // 发布患者作业
    release() {
      this.$confirm('是否发布?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        var datas = this.selectedStudent.map((item, index) => {
          return {
            // 获取学生用户名
            studentUserName: this.StudentList[index].userName,
            userId: this.StudentList[index].userId,
            patientId: this.patientIds,
            ptdeId: this.ptdeIds,
            seeMedicalHistory: this.checkSee.seeMedicalHistory,
            seeCheckOpinion: this.checkSee.seeCheckOpinion,
            seeCheckSee: this.checkSee.seeCheckSee
          }
        }
        )
        teacher.releases(datas)
          .then(response => {
            this.$message({
              type: 'success',
              message: '发布成功!'
            })
          })
        this.datas = [{}]
        this.selectedStudent = []
        this.checkSee = {
          seeMedicalHistory: 1,
          seeCheckOpinion: 1,
          seeCheckSee: 1
        }
      })
    },

    generateNodeContent(item) {
    // 和之前一样，生成节点显示的内容
      return `${item.seriesNumber} - ${item.modality}-${item.seriesDescription}-${item.bodyPartExamined} - ${item.seriesPat} - ${item.seriesDate} - ${item.seriesTime} - ${item.numFrames} - ${item.numSerRelIma} - ${item.radionuclideTotalDose} - ${item.manufacturer} - ${item.modelName}`
    },

    handleNodeClick(nodeData, node){
      // 判断是否是叶子节点
      if (!nodeData.children || nodeData.children.length === 0) {
        let imgName = nodeData.label;
        console.log(imgName);

        // 请求 Base64 图片数据
        teacher.getCheckListImg(imgName).then(response => {
          if (response.data) {
            // 如果数据非空，则展示图片
            this.imageBase64 = 'data:image/jpeg;base64,' + response.data;
            console.log(response  );

          } else {
            // 如果数据为空，清空图片并显示提示信息
            this.imageBase64 = '';
          }

          // 显示弹窗组件
          this.dialogVisible_CheckList = true;
        }).catch(error => {
          console.error("获取图片失败:", error);
          this.imageBase64 = ''; // 出错时也清空图片
          this.dialogVisible_CheckList = true; // 仍然显示弹窗，告知用户图片加载失败
        });
      }
    },

    // 格式化数据函数
    formatTreeData(responseData) {
      const { imSerialnameAndCount1, ptNameAndCheckCodeAndCheckData } = responseData;

      // 将 imSerialnameAndCount1 转换为树形结构
      const treeData = [
        {
          label: ptNameAndCheckCodeAndCheckData,
          children: Object.keys(imSerialnameAndCount1).map((key) => ({
            label: key,
            children: imSerialnameAndCount1[key].map((item) => ({
              label: item
            }))
          }))
        }
      ];

      return treeData;
    },


    handleRowDoubleClick(row, event) {
      // 处理双击表格行的逻辑
      // 打开详情对话框，并执行详情按钮的逻辑
      this.drawer = true
      this.ptdeId2 = row.ptdeId

      teacher.getCheckListImg(row.ptdeId)
      this.detailsClick(row.ptdeId)
      this.getSurvey(row.patientId)
      teacher.getTreeList(row.ptdeId).then(response => {
        const formattedData = this.formatTreeData(response.data);
        this.treeData = formattedData;
        console.log(response.data);

      })

      teacher.getFollow(row.ptdeId).then(res => {
        console.log(res.data)
        // 根据后端数据更新 Vue 数据
        this.interview1 = res.data.followTag;
        this.ptdtShsjTxt = res.data.followResult;
      }).catch(error => {
        this.interview1 = null
        this.ptdtShsjTxt = ''
      })
    },

    // 页面跳转到更新病人信息界面
    updatePtdetail(ptdeId, patientId) {
      if (ptdeId != null) {
        this.$router.push({ path: '/teacher/update', query: { id: ptdeId, patientId: patientId }}) //id=1
      } else {
        this.$message('当前患者无内容可编辑')
      }
    },
    // 获取随访记录
    getSurvey(patientId) {
      teacher.getSurvey(patientId).then(response => {
        this.Survey = response.data || {}
      })
    },
    // 获取病人病史,所见,意见,随访
    detailsClick(ptdeId) {
      teacher.getDetails(ptdeId).then(response => {
        this.DetailslList = response.data || {}
      })
    },
    changePages() {
      // 这里直接使用当前页码
      this.$set(this.TabPtdetailTailPatientVO, 'current', this.currentPage - 1); // 假设当前页从1开始
      this.getList();
    },
    changeCheckName(e) {
      this.$set(this.TabPtdetailTailPatientVO, 'ptdtCheckName', e)
    },
    // 将选择的状态赋值给选择框
    changePtdtStatusList(e) {
      this.$set(this.TabPtdetailTailPatientVO, 'ptdtStatus', e)
    },

    // 我的报告
    // 获取登录用户
    getMyRept() {
      var userName1 = this.$store.state.user.name
      this.$set(this.TabPtdetailTailPatientVO, 'ptdtBgDoctor', userName1)
      this.getList()
      console.log(this.$store.state.user);
    },

    changeUnitType(e) {
      this.$set(this.TabPtdetailTailPatientVO, 'ptdtCheckMachine', e)
    },

    changeSelectTime(e) {
      this.$set(this.TabPtdetailTailPatientVO, 'changeTime', e)
    },

    changeTimeType(e) {
      this.$set(this.TabPtdetailTailPatientVO, 'selectedTimeType', e)
    },

    doSearch() {
      this.showAdvancedDialog = false
      this.$set(this.TabPtdetailTailPatientVO, 'current', 0)
      this.getList()
    },
    // 获取患者信息
    getList() {
      // console.log(this.TabPtdetailTailPatientVO)
      // console.log('返回数据：')
      teacher.getTeacherListPage(this.TabPtdetailTailPatientVO)
        .then(response => {
          this.list = response.data.tabPtdetailTailPatientVO
          // 2023/5/9 补丁代码 开始 利用正则表达式,只取小数点前的时间
          const time = /.*(?=\.)/
          for (let index = 0; index < this.list.length; index++) {
            this.list[index].ptdtOperDatetime = time.exec(this.list[index].ptdtOperDatetime)
          }
          // 补丁代码 结束
          this.total = response.data.total
        })
      setTimeout(() => {
        this.dragControllerDiv1()
      }, 1000),
      setTimeout(() => {
        this.dragControllerDiv2()
      }, 1000)
    },
    resetData() {
      this.TabPtdetailTailPatientVO = {
        current: 0,
        currentSize: 10,
        startTime: '',
        endTime: ''
      }
      this.currentPage = 1
      this.ptdtCheckName = ''
      this.ptdtStatus = ''
      this.ptdtCheckMachine = ''
      this.changeTime = '',
      this.selectedTimeType = ''
      this.interview1 = null
      this.ptdtShsjTxt = ''
      this.$nextTick(() => {
      this.getList()
    });
    },
    // 检查项目下拉框
    getDropDownCheckName() {
      teacher.getDropDownCheckName().then(response => {
        this.checkNameList = response.data || {}
      })
    },
    // 获取检查类型
    getDropDownModelName() {
      teacher.getDropDownModelName().then(response => {
        this.checkMachineList = response.data || {}
      })
    },
    // 获取医生
    getDropDownDoctor() {
      // 报告医生
      teacher.getBgDoctorDropDown().then(response => {
        this.ptdtBgDoctorList = response.data || {}
        // console.log(this.ptdtBgDoctorList)
        const extractedNames = this.ptdtBgDoctorList.map(item => item.doctorName)
        this.ptdtBgDoctorList = extractedNames
        // console.log(this.ptdtBGDoctorList)
      })
      // 审核医生
      teacher.getShDoctorDropDown().then(response => {
        this.ptdtShDoctorList = response.data || {}
        // console.log(this.ptdtShDoctorList)
        const extractedNames = this.ptdtShDoctorList.map(item => item.doctorName)
        this.ptdtShDoctorList = extractedNames
        // console.log(this.ptdtShDoctorList)
      })
      // 复审医生
      teacher.getFsDoctorDropDown().then(response => {
        this.ptdtFsDoctorList = response.data
        const extractedNames = this.ptdtFsDoctorList.map(item => item.doctorName)

        // console.log(extractedNames)
        this.ptdtFsDoctorList = extractedNames

        console.log('复审医生')
        console.log(this.ptdtFsDoctorList)
        // console.log('复审医生')
      })
    },
    // 获取显像剂
    getDropDownXxj() {
      teacher.getDropDownXxj().then(response => {
        this.checkXxjList = response.data || {}
      })
    },
    // 获取院落
    getDropDownBranch() {
      teacher.getDropDownBranch().then(response => {
        this.checkBranchList = response.data || {}
      })
    },
    getPatientPro() {
      teacher.getPatientPro().then(response => {
        this.persontxt = response.data || {}
      })
    },
    // 状态下拉框
    getDropDownState() {
      teacher.getDropDownState().then(response => {
        this.ptdtStatusList = response.data
      })
    },

    // 设备下拉框
    getDropDownUnitType() {
      // teacher.getDropDownUnitType().then(response => {
      //   this.unitTypeList = response.data
      // })

      teacher.getCheckMachineList().then(res => {
        this.unitTypeList = res.data.checkMachineList
      })
    },

    tabIndex(row, event, column) {
      this.drawer = true
      this.detailsClick(row.ptdeId)
      this.getSurvey(row.patientId)
    },

    // ----------------------------------------------编辑弹窗-------------------------------------------
    edit(ptdeId, patientId) {
      this.handleNodeClick2()
      this.ptdeId2 = ptdeId
      this.patientId2 = patientId
      this.editDialogVisible = true
      this.getDropDownCheckName2()
      this.getPatient2(this.ptdeId2)
      this.getBgReady2()
      setTimeout(() => {
        this.dragControllerDiv()
      }, 1000)
    },
    // 测试用代码
    testLog(row) {
      this.studyInsta2 = row.studyInsta
      // console.log('row:')
      // console.log(row)
      // console.log('studyInsta2:')
      // console.log(this.studyInsta2)
    },

    // 0702 保存按钮点击事件
    open() {
      // this.downloadSoft()
      console.log('open 被触发')
      const fn_type = 'PTFC'
      const action = 'open'
      this.invokeSoftware(fn_type, action)
    },
    downloadSoft() {
      this.$confirm('是否下载下载器软件？')
        .then(_ => {
          setTimeout(() => {
            window.location.href = `http://172.20.128.6:8087/tspetsetup1.0.3.exe`
          }, 3000)
          window.location.href = `http://172.20.128.6:8087/融合软件[TEST].x64.20230810-FULL.rar`
        })
        .catch(_ => {
        })
    },
    append() {
      // this.downloadSoft()

      console.log('append 被触发')
      const fn_type = 'PTFC'
      const action = 'append'
      this.invokeSoftware(fn_type, action)
    },
    // 请求信息
    invokeSoftware(fn_type, action) {
      let uuid01 = uuidv4()
      uuid01 = uuid01.replace(/-/g, '')
      // console.log('uuid01 = ' + uuid01)
      const msg = {
        function: fn_type,
        action: action,
        uuid: uuid01,
        series: this.select_list
      }
      // console.log(JSON.stringify(msg))
      teacher.getResponseStatus(JSON.stringify(msg)).then(response => {
        console.log('teacher.getResponseStatus调用')
        if (response.code == 200) {
          // console.log('ok')
          try {
            // 调试用

            // throw '未下载';
            window.location.href = `tspet://${action}/${uuid01}`
            console.log('href ok')
          } catch (error) {
            console.log(' error===> ' + error)
            // 下载对应软件
            setTimeout(() => {
              window.location.href = `http://172.20.128.6:8087/tspetsetup1.0.3.exe`
            }, 3000)
            window.location.href = `http://172.20.128.6:8087/融合软件[TEST].x64.20230810-FULL.rar`
          }
        }
      })
    },

    // 确保只能选中0,1,2个选项
    checkSelectable(row) {
      // console.log(row);
      return this.multipleSelection.length < 2 ||
        (row.seriesInst == this.select_list[0].seriesInst ||
          row.seriesInst == this.select_list[1].seriesInst)
    },
    // 改变多选框状态
    handleSelectionChange(val) {
      // console.log('改变多选框状态')
      this.multipleSelection = val
      // 清空 select_list
      this.select_list = []
      val.forEach(element => {
        this.select_list.push(element)
      })
      console.log(this.select_list)
      console.log(this.multipleSelection)
      this.isShow()
    },
    // 改变显示状态
    isShow() {
      // 选中弹出样式
      if (this.multipleSelection.length > 0) {
        // console.log(this.multipleSelection.length)
        this.$refs.edits.style.visibility = 'visible'
      } else {
        this.$refs.edits.style.visibility = 'hidden'
      }
    },
    // 指定一个key标识这一行的数据
    getRowKey(row) {
      // console.log(row);
      return row.seriesNumber
    },

    // 当前页改变时触发 跳转其他页
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`)
      this.currentPage = val
    },

    editHandleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => {
        })
    },

    // 点击节点触发
    getTemplateInfo2(e) {
      if (e.children == null) {
        teacher.getTemplateInfo(e.id, e.pid).then(
          response => {
            this.TemplateInfo2 = response.data || {}
            const tempStr1 = this.TemplateInfo2.libCheckSj
            this.PtPatientVo2.ptdtCheckSjTxt = tempStr1 ? `${this.PtPatientVo2.ptdtCheckSjTxt || ''}${tempStr1}` : ''
            const tempStr2 = this.TemplateInfo2.libCheckYj
            this.PtPatientVo2.ptdtCheckyjTxt = tempStr2 ? `${this.PtPatientVo2.ptdtCheckyjTxt || ''}${tempStr2}` : ''
          }
        )
      }
    },
    getTemplateInfo2a(e) {
      const tempStr1 = this.TemplateInfo2.libCheckSj
      this.PtPatientVo2.ptdtCheckSjTxt = tempStr1 ? `${this.PtPatientVo2.ptdtCheckSjTxt || ''}${tempStr1}` : ''
    },
    getTemplateInfo2b(e) {
      const tempStr2 = this.TemplateInfo2.libCheckYj
      this.PtPatientVo2.ptdtCheckyjTxt = tempStr2 ? `${this.PtPatientVo2.ptdtCheckyjTxt || ''}${tempStr2}` : ''
    },
    getTemplateInfo3(e) {
      if (e.children == null) {
        teacher.getTemplateInfo(e.id, e.pid).then(
          response => {
            this.TemplateInfo3 = response.data || {}
            const tempStr1 = this.TemplateInfo3.libCheckSj
            this.PtPatientVo3.ptdtCheckSjTxt = tempStr1 ? `${this.PtPatientVo3.ptdtCheckSjTxt || ''}${tempStr1}` : ''
            const tempStr2 = this.TemplateInfo3.libCheckYj
            this.PtPatientVo3.ptdtCheckyjTxt = tempStr2 ? `${this.PtPatientVo3.ptdtCheckyjTxt || ''}${tempStr2}` : ''
            this.PtPatientVo3.label = e.label
            this.$set(this.TemplateInfo3, 'label', this.PtPatientVo3.label)
            this.TemplateInfo3.id = e.id
          }
        )
      }
    },
    getBgReady2() {
      teacher.getHistory(this.patientId2, this.ptdeId2).then(
        response => {
          this.HistoryVo2 = response.data || {}
        }
      )
    },
    // 标签页切换触发
    handleNodeClick2(e) {
      console.log(this.ptdeId2); // id能够正常传入

      switch (this.activeName2) {
        case 'first':
          this.getBgReady2()
          break
        case 'second':
          console.log('second')
          teacher.getAllImgs(this.ptdeId2).then(response => {
            if (typeof response.data === 'number') {
              this.urls = []
              this.allimgnumber = 0
              this.selectimgnumber = 0
            } else {
              // this.imgs = response.data[0].imageBase64

              this.urls = []

              for (let i = 0; i < response.data.length; i++) {
                // 依照el-image需要的数据格式修改data对象到this.url中
                this.url.completePath = response.data[i].completePath
                this.url.path ='data:image/jpeg;base64,' + response.data[i].imageBase64
                this.url.imageID = response.data[i].imageID
                this.url.imageDescription = response.data[i].imageDescription
                this.url.selected = !response.data[i].number
                // 修改好的对象push进对象数组this.urls中
                this.urls.push(this.url)
                this.url = {}
                this.allimgnumber = response.data.length
                this.selectimgnumber1()

              }
              console.log(this.urls);

            }

          })

          // teacher.getImgs(this.studyInsta2).then(response => {
          //   if (typeof response.data === 'number') {
          //     this.urls = []
          //     this.allimgnumber = 0
          //     this.selectimgnumber = 0
          //   } else {
          //     this.imgs = response.data

          //     this.urls = []

          //     for (let i = 0; i < response.data.length; i++) {
          //       // 显示数据是否获取正常

          //       // 依照el-image需要的数据格式修改data对象到this.url中
          //       this.url.completePath = response.data[i].completePath
          //       this.url.path = 'http://172.20.128.6:8089' + response.data[i].completePath
          //       this.url.selected = !response.data[i].number

          //       // 修改好的对象push进对象数组this.urls中
          //       this.urls.push(this.url)
          //       this.url = []
          //       this.allimgnumber = response.data.length
          //       this.selectimgnumber1()
          //     }
          //   }
            // 展示数组
            // console.log(799)
            console.log(this.urls)
            // console.log(388)
          // })
          break
        case 'third':
          teacher.getTemplate().then(response => {
            this.data2 = response.data.public
          })
          break
        case 'fourth':
          // console.log('four 已触发')
          // console.log(this.studyInsta2)
          const data = {
            ptdeid: this.ptdeId2,
            nameList: []
          }

          teacher.getSequence1(this.studyInsta2).then(response => {
            this.tableList2 = response.data
            console.log(this.tableList2);
          })

          teacher.getSequence3(data).then(response => {
            this.tableList = [response.data]
            console.log(this.tableList)
          })

          break
        case 'fifth':
      }
    },
    changeCheckName2(e) {
      this.$set(this.PtPatientVo2, 'ptdtCheckName', e)
    },
    getDropDownCheckName2() {
      teacher.getDropDownCheckName().then(response => {
        this.checkNameList2 = response.data
      })
    },
    // 获取患者信息
    getPatient2(ptdeId2) {
      teacher.getPatientPro(ptdeId2).then(response => {
        this.PtPatientVo2 = response.data
      })
      this.change2tonull()
      setTimeout(() => {
        this.qtptdtStatus = this.PtPatientVo2.ptdtStatus
        this.qtptdtBgDoctor = this.PtPatientVo2.ptdtBgDoctor
        this.qtptdtShDoctor = this.PtPatientVo2.ptdtShDoctor
        this.qtptdtShDoctor2 = this.PtPatientVo2.ptdtShDoctor2
        this.qtptdtBranch = this.PtPatientVo2.ptdtBranch
        this.originalptdtStatus = this.qtptdtStatus
        this.originalBgDoctor = this.qtptdtBgDoctor
        this.originalShDoctor = this.qtptdtShDoctor
        this.originalShDoctor2 = this.qtptdtShDoctor2

        this.checkingStatusItems = this.ptdtStatusList.filter(item => item.status === this.qtptdtStatus)

        // console.log(this.checkingStatusItems)
      }, 100)
    },
    // 保存
    onSubmit2() {
      this.$confirm('确定保存, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        teacher.updatePatient(this.PtPatientVo2)
          .then(response => {
            this.$message({
              type: 'success',
              message: '保存成功!'
            })
            this.editDialogVisible = false
            this.getList()
          })
      })
    },
    // 失去焦点事件
    onEditorBlur(quill) {
    },

    // 准备富文本编辑器
    onEditorReady(quill) {
    },
    // 内容改变事件
    onEditorChange({ quill, html, text }) {
      this.content = html
    },

    openTab(tabName) {
      // 隐藏所有内容
      const tabContents = document.querySelectorAll('.tab-content')
      tabContents.forEach(tab => tab.classList.remove('active'))

      // 高亮当前选中的按钮
      const tabs = document.querySelectorAll('.tabs button')
      tabs.forEach(tab => tab.classList.remove('active'))

      // 显示选定的内容
      const selectedTab = document.getElementById(tabName)
      const selectedButton = document.querySelector('.tabs button[data-tab="' + tabName + '"]')
      if (selectedTab && selectedButton) {
        selectedTab.classList.add('active')
        selectedButton.classList.add('active')
      }
    },
    openTab1(tabName) {
      // 隐藏所有内容
      const tabContents = document.querySelectorAll('.tab1-content')
      tabContents.forEach(tab => tab.classList.remove('active'))

      // // 高亮当前选中的按钮
      // const tabs = document.querySelectorAll('.tabs1 button')
      // tabs.forEach(tab => tab.classList.remove('active'))

      // 显示选定的内容
      const selectedTab = document.getElementById(tabName)
      const selectedButton = document.querySelector('.tabs1 button[data-tab="' + tabName + '"]')
      if (selectedTab && selectedButton) {
        selectedTab.classList.add('active')
        selectedButton.classList.add('active')
      }
    },
    reload1() {
      location.reload()
    },
    // 添加tab页
    addTab(ptdeId1) {
      if (this.editableTabs.length >= this.maxTabsAllowed) {
        this.$message.error('已达到最大标签页数量！');
        return;
      }
      const newTabName = ++this.tabIndex + '';
      const newTabData = {/* 你的数据属性 */ }; // 创建新的数据对象
      this.ptdeId2 = ptdeId1
      const ptdeId = this.PtPatientVo2.ptdeId;
  setTimeout(() => {
      teacher.getCheckDate(this.ptdeId2).then(res => {
        const date_check = res.msg;
        const formattedDate = date_check.split(" ")[0];
        const newTab = {
          title: `Tab ${newTabName}`,
          name: newTabName,
          content: this.PtPatientVo2.ptName + " - " + formattedDate,
          ptdeId: this.PtPatientVo2.ptdeId, // 将新的数据对象与标签页关联
        };

        this.editableTabs.push(newTab); // 将新标签页添加到editableTabs数组中
        this.editableTabsValue = newTabName;
        this.tabIndex = this.tabIndex + 1; // 更新tabIndex
        this.getDoctorAndTime(this.PtPatientVo2.ptdeId);
      });
      this.handleNodeClick2()
    }, 200);
  },

    // 删除tab页
    removeTab(targetName) {
      this.editableTabsValue = this.editableTabs
        .filter(tab => tab.name !== targetName)
        .map(tab => tab.name) // 更新可选择的标签名列表
        [0] || '' // 如果列表为空，则设置为空字符串
      this.editableTabs = this.editableTabs.filter(tab => tab.name !== targetName)
      if (this.editableTabs.length === 0) {
        this.editableTabsValue = 'defaultTab' // 假设'defaultTab'是默认标签页的name
      }
      this.changeTab(this.editableTabsValue)
      this.urls = []
    },
    // 转换Tab
    changeTab(targetName) {
      this.editchangeTab = this.editableTabs.filter(tab => tab.name == targetName)

      const editchangePtid = this.editchangeTab[0].ptdeId
      teacher.getAllImgs(editchangePtid)
      this.ptdeId2 = editchangePtid
      this.getPatient2(editchangePtid)
      this.buttonShowOrNot()
      setTimeout(() => {
        this.urls = []

        this.handleNodeClick2(editchangePtid)
        this.getDoctorAndTime(this.PtPatientVo2.ptdeId)
      }, 200)
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        })
        .catch(_ => {
        })
    },
    // 模板添加
    mbappendbox(data) {
      this.$prompt('请输入标题', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消'
      }).then(({ value }) => {
        this.mbappend(data, value)
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '取消添加'
        })
      })
    },
    mbappend(data, title) {
      // console.log(data)
      this.mbappendList.libName = title
      this.mbappendList.libCheckSj = ''
      this.mbappendList.libCheckYj = ''
      this.mbappendList.libParentID = data.id
      console.log(this.mbappendList)
      teacher.mbappend(this.mbappendList).then(
        response => {
          this.mbsaveTxt = response.msg || {}
          console.log(this.mbsaveTxt)
          if (this.mbsaveTxt === '保存成功') {
            this.$message({
              message: '添加成功',
              type: 'success'
            })
          } else {
            this.$message.error('添加失败')
          }
        }
      )
      setTimeout(() => {
        this.handleNodeClick2()
      }, 500)
    },
    // 模板删除
    mbremovebox(data) {
      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.mbremove(data)
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    // id:id++
    mbremove(data) {
      this.convertedData = this.convertData(data)
      // console.log(JSON.stringify(this.convertedData, null, 2))
      // console.log(data)
      teacher.mbremove(JSON.stringify(this.convertedData, null, 2)).then(
        response => {
          this.mbsaveTxt = response.msg || {}
          console.log(this.mbsaveTxt)
          if (this.mbsaveTxt === '保存成功') {
            this.$message({
              message: '删除成功',
              type: 'success'
            })
          } else {
            this.$message.error('删除失败')
          }
        }
      )

      setTimeout(() => {
        this.handleNodeClick2()
      }, 500)
    },
    convertData(data) {
      if (data.children && data.children.length > 0) {
        this.convertdata = {
          libID: data.id,
          children: data.children.map(child => {
            const childObj = {
              id: child.id
            }

            // 如果 child 有 children 属性且其长度大于 0，则递归调用 convertData
            if (child.children && child.children.length > 0) {
              childObj.children = this.convertData(child).children
            }

            // 如果 child 没有 children 属性或者 children 数组为空，则不设置 childObj.children
            // 这样在返回的对象中就不会包含 "children: []"

            return childObj
          })
        }
      } else {
        this.convertdata = {
          libID: data.id
        }
      }

      return this.convertdata
    },
    // 转换函数，将纯文本转换为 RTF 格式
    // convertToRTF(text) {
    //   // 假设我们想要使用默认字体（如宋体）和默认大小（如12号）
    //   const defaultFont = '\\f0\\fs24' // 宋体, 24号字体大小
    //   return `{\\rtf1\\ansi\\deff0\\deflang1033\\par${defaultFont}${text}\\par}`
    // },
    convertToRTF(text) {
      // 默认字体和大小
      const defaultFont = '\\f0\\fs24' // 假设是某种默认字体和大小

      // 将文本中的每个换行符替换为RTF的段落标记，但不在开头和结尾添加额外的\par
      const rtfText = defaultFont + text.replace(/\n/g, '\\par' + defaultFont)

      // 包裹整个文本内容在RTF边界标记中，并添加一个结尾的\par以确保文本格式正确
      const fullRTF = `{\\rtf1\\ansi\\deff0\\deflang1033${rtfText}\\par}`

      // 返回RTF格式的文本
      return fullRTF
    },

    // mbsave 函数
    mbsave(id, label, libCheckSj, libCheckYj) {
      // console.log(id, label, libCheckSj, libCheckYj)

      // 将 libCheckSj 和 libCheckYj 转换为 RTF 格式
      const rtfLibCheckSj = this.convertToRTF(libCheckSj)
      const rtfLibCheckYj = this.convertToRTF(libCheckYj)

      // 创建 mbsaveList，包含 RTF 格式的数据
      const mbsaveList = {
        libID: id,
        libCheckSj: rtfLibCheckSj,
        libCheckYj: rtfLibCheckYj,
        libName: label // 假设 libName 不需要转换为 RTF 格式
      }

      // console.log(mbsaveList)

      // 发送 mbsaveList 到 teacher.mbsave 方法
      teacher.mbsave(mbsaveList).then(response => {
        this.mbsaveTxt = response.msg || {}
        // console.log(this.mbsaveTxt)
        if (this.mbsaveTxt === '保存成功') {
          this.$message({
            message: '保存成功',
            type: 'success'
          })
        } else {
          this.$message.error('保存失败')
        }
      })

      // 延迟调用 handleNodeClick2 方法
      setTimeout(() => {
        this.handleNodeClick2()
      }, 500)
    },
    getCheckedNodes() {
      this.$refs.tree.getCheckedNodes((checkedNodes) => {
        console.log('获取到的选中的节点:', checkedNodes)
      })
    },
    renderContent(h, { node, data, store }) {
      return (
        <span class='custom-tree-node'>
          <span>{node.label}</span>
          <span>
            <el-button size='mini' type='text' on-click={() => this.append(data)}>Append</el-button>
            <el-button size='mini' type='text' on-click={() => this.remove(node, data)}>Delete</el-button>
          </span>
        </span>)
    },
    // 历史查询
    hisDoSearch(cxvalue, hisSearchvalue) {
      console.log(hisSearchvalue);

      // console.log(cxvalue)
      if (cxvalue > 0) {
        // console.log(cxvalue)
        teacher.getHistorybyname(hisSearchvalue).then(response => {
          this.hisSearchList = response.data || {}
          this.jwchecked = Object.keys(response.data).length

        })
      } else if (cxvalue < 1) {
        // console.log(cxvalue)
        teacher.getHistorybycheckid(hisSearchvalue).then(response => {
          this.hisSearchList = response.data || {}

          this.jwchecked = Object.keys(response.data).length
        })
      } else {
      }
    },
    // 名字查询
    hisDoSearch1(cxvalue, hisSearchvalue) {
      teacher.getHistorybyname(hisSearchvalue).then(response => {
        this.hisSearchList = response.data || {}
      })
    },
    // 检查号查询
    hisDoSearch2(cxvalue, hisSearchvalue) {
      // console.log(cxvalue)
      teacher.getHistorybycheckid(hisSearchvalue).then(response => {
        this.hisSearchList = response.data || {}
      })
    },
    jlcheck(jlchecked, hisSearchList) {
      if (jlchecked) {
        this.jlcheckedList = hisSearchList.filter((item) => {
          return item.ptdtCheckName === this.PtPatientVo2.ptdtCheckName
        })
        this.jlcheckedLista = this.hisSearchList
        this.hisSearchList = this.jlcheckedList
        this.jwchecked = Object.keys(this.hisSearchList).length
      } else {
        this.hisSearchList = this.jlcheckedLista
        this.jwchecked = Object.keys(this.hisSearchList).length
      }
    },
    cns() {
      console.log(this.TemplateInfo3)
    },
    getList1() {
      // console.log(this.TabPtdetailTailPatientVO1)
      // console.log('返回数据：')
      teacher.getTeacherListPage(this.TabPtdetailTailPatientVO1)
        .then(response => {
          // console.log(response.data.tabPtdetailTailPatientVO1)
          this.list1 = response.data.tabPtdetailTailPatientVO1
          // 2023/5/9 补丁代码 开始 利用正则表达式,只取小数点前的时间
          // console.log(this.list1)
          const time = /.*(?=\.)/
          for (let index = 0; index < this.list.length; index++) {
            this.list1[index].ptdtOperDatetime = time.exec(this.list1[index].ptdtOperDatetime)
          }
          // 补丁代码 结束
          this.total1 = response.data.total1
        })
    },
    // 图像添加高亮
    toggleHighlight(index) {
      this.urls[index].selected = !this.urls[index].selected
      this.selectimgnumber1()
      this.imgchange()
      this.imgchange()
      // console.log(this.urls[index])
    },
    selectimgnumber1() {
      this.selectimgnumber = 0
      this.urls.forEach(url => {
        this.selectimgnumber += url.selected
      })
    },

    // 大小图像切换
    imgchange() {
      if (this.elimg === 30) {
        this.elimg = 98
        this.imgbs = '大图标'
      } else {
        this.elimg = 30
        this.imgbs = '小图标'
      }
    },
    // 全选图片
    selectAllimg() {
      this.selectAll = !this.selectAll
      this.urls.forEach(url => {
        url.selected = this.selectAll
      })
      this.selectimgnumber1()
      this.imgchange()
      this.imgchange()
    },
    // 删除图片
    deleteimg() {
      this.urls.forEach((url) => {
        if (url.selected === true) {
          // this.imgchangeTxt= 'http://172.20.128.6:8089/api/tspet/imagesMap?StudyInsta=' +url.path
          this.deleteimgList.push(url.imageID)
        }

      })
      const imageIdList = {
        imageIdList: this.deleteimgList
      }
      teacher.deleteEditImg(imageIdList).then(res => {
          this.deleteimgList = [];
      })
      setTimeout(() => {
        this.$message.success("删除成功")
        this.handleNodeClick2()
      }, 1000)
    },
    // 阴阳性改2为null
    change2tonull() {
      // console.log(this.PtPatientVo2.ptdtPositiveflag)
      setTimeout(() => {
        if (this.PtPatientVo2.ptdtPositiveflag == 2) {
          this.PtPatientVo2.ptdtPositiveflag = null
          // console.log(this.PtPatientVo2.ptdtPositiveflag)
        }
      }, 250)
    },
    handleRowClick(row, column, event) {
      // console.log('行被点击了:', row)
      console.log(row.ptName);

      this.HistoryVo2 = row
      this.HistoryVo2.ptdtLcdiagnousTxt = row.ptdtLcdiagnousTxt
      this.HistoryVo2.ptdtBgreadyTxt = row.ptdtBgreadyTxt
      this.HistoryVo2.ptdtChecksjTxt = row.ptdtChecksjTxt
      this.HistoryVo2.ptdtCheckyjTxt = row.ptdtCheckyjTxt
      this.HistoryVo2.studyInsta = row.studyInsta
      // console.log(this.HistoryVo2.studyInsta)
      // const data = {
      //   ptdeid: '',
      //   nameList: []
      // }
      // data.nameList.push(row.ptName);
      // teacher.hisSequence(data).then(res => {
      //   this.tableList3 = res.data
      // })
      teacher.getSequence1(this.HistoryVo2.studyInsta).then(response => {
        console.log(response.data)
        this.tableList3 = response.data
      })
    },

    gethistoryimglist(studyInsta) {
      // console.log(1121)
      teacher.getImgs(studyInsta).then(response => {
        if (typeof response.data === 'number') {
          this.hisurls = []

          // console.log(1234)
        } else {
          this.hisurls = []

          for (let i = 0; i < response.data.length; i++) {
            // 显示数据是否获取正常
            // console.log(response.data[0])
            // 依照el-image需要的数据格式修改data对象到this.url中
            this.hisurl.completePath = response.data[i].completePath
            this.hisurl.path = 'http://172.20.128.6:8087' + response.data[i].completePath
            this.hisurl.selected = !response.data[i].number
            // console.log(this.url)
            // 修改好的对象push进对象数组this.urls中
            this.hisurls.push(this.hisurl)
            this.hisurl = []
            // this.allimgnumber = response.data.length
            // this.selectimgnumber1()
          }
        }
        // 展示数组
        // console.log(699)
        // console.log(this.hisurls)
        // console.log(288)
      })
      // console.log(2232)
    },
    handleCommand(command) {
      switch (command) {
        case 'a':
          this.ztdialogVisible = true
          break
        case 'b':
          this.bgdialogVisible = true
          break
        case 'c':
          this.shdialogVisible = true
          break
        case 'd':
          this.fsdialogVisible = true
          break
      }
    },
    // 改变检查状态
    changeCheckStatus() {
      this.originalptdtStatus = this.qtptdtStatus
      const qtchangeList = {
        ptdeId: this.ptdeId2,
        ptdtStatus: this.qtptdtStatus
      }
      // console.log(qtchangeList)
      teacher.changeCheckStatus(qtchangeList).then(response => {
        this.qtchangetxt = response.data || {}
      })
      // console.log(this.qtptdtStatus)
      // 同步页面检查状态
      this.checkingStatusItems = this.ptdtStatusList.filter(item => item.status === this.qtptdtStatus)
      this.getList()
    },
    resetCheckStatus() {
      // 取消按钮的逻辑，复原 qtptdtStatus 到原始值
      this.qtptdtStatus = this.originalptdtStatus
    },
    // 改变报告医生
    changeBgDoctor() {
      this.originalBgDoctor = this.qtptdtBgDoctor
      const qtchangeList = {
        ptdeId: this.ptdeId2,
        ptdtBgDoctor: this.qtptdtBgDoctor
      }
      // console.log(qtchangeList)
      teacher.changeBgDoctor(qtchangeList).then(response => {
        this.qtchangetxt = response.data || {}
      })
      // console.log(this.qtptdtBgDoctor)
    },
    resetBgDoctor() {
      // 取消按钮的逻辑，复原 qtptdtBgDoctor 到原始值
      this.qtptdtBgDoctor = this.originalBgDoctor
    },
    // 改变审核医生
    changeShDoctor() {
      this.originalShDoctor = this.qtptdtShDoctor
      const qtchangeList = {
        ptdeId: this.ptdeId2,
        ptdtShDoctor: this.qtptdtShDoctor
      }
      // console.log(qtchangeList)
      teacher.changeShDoctor(qtchangeList).then(response => {
        this.qtchangetxt = response.data || {}
      })
      // console.log(this.qtptdtShDoctor)
      this.getList()
    },
    resetShDoctor() {
      // 取消按钮的逻辑，复原 qtptdtShDoctor 到原始值
      this.qtptdtShDoctor = this.originalShDoctor
      this.getList()
    },
    // 改变复审医生
    changeShDoctor2() {
      this.originalShDoctor2 = this.qtptdtShDoctor2
      const qtchangeList = {
        ptdeId: this.ptdeId2,
        ptdtShDoctor2: this.qtptdtShDoctor2
      }
      // console.log(qtchangeList)
      teacher.changeShDoctor2(qtchangeList).then(response => {
        this.qtchangetxt = response.data || {}
      })
      // console.log(this.qtptdtShDoctor2)
    },
    resetShDoctor2() {
      // 取消按钮的逻辑，复原 qtptdtShDoctor2 到原始值
      this.qtptdtShDoctor2 = this.originalShDoctor2
      this.getList()
    },
    // 改变院落
    changeBranch() {
      const qtchangeList = {
        ptdeId: this.ptdeId2,
        ptdtBranch: this.qtptdtBranch
      }
      // console.log(qtchangeList)
      teacher.changeBranch(qtchangeList).then(response => {
        this.qtchangetxt = response.data || {}
      })
      // console.log(this.qtptdtBranch)
      this.getList()
    },
    // 报告医生审核医生复审医生切换
    checkDoctor() {
      console.log(this.checkingStatusItems[0].statuscn)
      if (this.checkingStatusItems[0].statuscn == '待报告') {
        this.shouldShowDemo1 = true
        this.shouldShowDemo2 = true
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = true
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '报告中') {
        this.shouldShowDemo1 = true
        this.shouldShowDemo2 = true
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = true
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '待审核') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = true
        this.shouldShowDemo6 = true
        this.shouldShowDemo7 = true
        this.shouldShowDemo8 = true
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = true
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '审核中') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = true
        this.shouldShowDemo6 = true
        this.shouldShowDemo7 = true
        this.shouldShowDemo8 = true
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = true
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '待复审') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = true
        this.shouldShowDemo10 = true
        this.shouldShowDemo11 = true
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = true
      } else if (this.checkingStatusItems[0].statuscn == '复审中') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = true
        this.shouldShowDemo10 = true
        this.shouldShowDemo11 = true
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = true
      } else {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = false
        // this.shouldShowDemo30 = false
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = false
      }
      // console.log(this.checkingStatusItems)
    },
    // 富文本编辑器被选中
    onEditorFocus($event) {
      // console.log(123123123)
      // console.log($event)
      console.log(this.$store.state.user)
      switch (this.checkingStatusItems[0].statuscn) {
        case '待报告':
          if (this.$store.state.user.roles.filter(item => item === 'reportDoctor') == 'reportDoctor') {
            this.reportExtract(this.PtPatientVo2.ptdeId)
            // console.log('待报告')
          }
          break
        case '待审核':
          if (this.$store.state.user.roles.filter(item => item === 'reviewDoctor') == 'reviewDoctor') {
            this.reviewExtract(this.PtPatientVo2.ptdeId)
          }
          break
        case '待复审':
          if (this.$store.state.user.roles.filter(item => item === 'reexamineDoctor') == 'reexamineDoctor') {
            this.reexamineExtract(this.PtPatientVo2.ptdeId)
          }
          break
      }
    },
    // 提取医生及时间获取
    getDoctorAndTime(ptdeId) {
      const ptdeId1 = String(ptdeId)
      teacher.getDoctorAndTime(ptdeId1).then(response => {
        const data = response.data || {}
        // console.log('提取医生及时间获取')
        // console.log(data)
        // console.log('提取医生及时间获取')
        this.DoctorAndTime = [{
          status: '',
          doctor: '',
          time: ''
        },
        {
          status: '',
          doctor: '',
          time: ''
        },
        {
          status: '',
          doctor: '',
          time: ''
        }]
        if ((data.ptdtBgdoctor != null) && (data.ptdtReportdate != null) && (data.ptdtBgdoctor != '')) {
          this.DoctorAndTime[0].status = '【报告】'
          this.DoctorAndTime[0].doctor = data.ptdtBgdoctor
          this.DoctorAndTime[0].time = data.ptdtReportdate
          if ((data.ptdtShdoctor != null) && (data.ptdtShdate != null) && (data.ptdtShdoctor != '')) {
            this.DoctorAndTime[1].status = '【审核】'
            this.DoctorAndTime[1].doctor = data.ptdtShdoctor
            this.DoctorAndTime[1].time = data.ptdtShdate
            if ((data.ptdtShdoctor2 != null) && (data.ptdtShdate2 != null) && (data.ptdtShdoctor2 != '')) {
              this.DoctorAndTime[2].status = '【复审】'
              this.DoctorAndTime[2].doctor = data.ptdtShdoctor2
              this.DoctorAndTime[2].time = data.ptdtShdate2
            }
          }
        }
        // console.log(this.DoctorAndTime)
      })
    },
    // 按钮成功反馈
    successFeedback(msg) {
      this.$message({
        message: msg,
        type: 'success'
      })
    },
    // 按钮是否展示
    buttonShowOrNot() {
      if (this.checkingStatusItems[0].statuscn == '待审核' && this.qtptdtBgDoctor == this.$store.state.user.name) {
        this.shouldShowDemo3 = false
        this.shouldShowDemo30 = true
        console.log('退回审核')
      } else if (this.checkingStatusItems[0].statuscn == '待复审' && this.qtptdtShDoctor == this.$store.state.user.name) {
        this.shouldShowDemo3 = false
        this.shouldShowDemo30 = true
        console.log('退回复审')
      } else if (this.checkingStatusItems[0].statuscn != '待报告' && this.checkingStatusItems[0].statuscn != '报告中' && this.checkingStatusItems[0].statuscn != '待审核' && this.checkingStatusItems[0].statuscn != '审核中' && this.checkingStatusItems[0].statuscn != '待复审' && this.checkingStatusItems[0].statuscn != '复审中') {
        this.shouldShowDemo3 = false
        this.shouldShowDemo30 = false
      } else {
        this.shouldShowDemo3 = true
        this.shouldShowDemo30 = false
      }
    },
    // 按钮是否禁用
    buttonDisabled() {
      // console.log('按钮是否禁用1')
      // 报告阶段判断
      if (this.checkingStatusItems[0].statuscn == '待报告') {
        this.shouldDisabled1 = true
        this.shouldDisabled2 = false
        this.shouldDisabled3 = false
        this.shouldDisabled4 = false
        this.shouldDisabled5 = false
        this.shouldDisabled6 = false
        this.shouldDisabled7 = false
        this.shouldDisabled8 = false
        this.shouldDisabled9 = false
        this.shouldDisabled10 = false
        this.shouldDisabled11 = false
        this.shouldDisabled12 = false
        this.shouldDisabled13 = false
        this.shouldDisabled14 = false
        // console.log('按钮是否禁用2')
      } else if (this.checkingStatusItems[0].statuscn == '报告中') {
        if (this.$store.state.user.name != this.qtptdtBgDoctor) {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = false
          this.shouldDisabled12 = false
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          // console.log('按钮是否禁用30')
        } else {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = true
          this.shouldDisabled3 = true
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = true
          this.shouldDisabled12 = true
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          // console.log('按钮是否禁用3')
        }
      }
      // }

      // 审核阶段判断
      if (this.checkingStatusItems[0].statuscn == '待审核') {
        this.shouldDisabled1 = false
        this.shouldDisabled2 = false
        this.shouldDisabled3 = false
        this.shouldDisabled4 = true
        this.shouldDisabled5 = false
        this.shouldDisabled6 = false
        this.shouldDisabled7 = false
        this.shouldDisabled8 = false
        this.shouldDisabled9 = false
        this.shouldDisabled10 = false
        this.shouldDisabled11 = false
        this.shouldDisabled12 = true
        this.shouldDisabled13 = false
        this.shouldDisabled14 = false
        // console.log('按钮是否禁用4')
      } else if (this.checkingStatusItems[0].statuscn == '审核中') {
        if (this.$store.state.user.name != this.qtptdtShDoctor) {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = false
          this.shouldDisabled12 = false
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          // console.log('按钮是否禁用50')
        } else {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = true
          this.shouldDisabled6 = true
          this.shouldDisabled7 = true
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = true
          this.shouldDisabled12 = true
          this.shouldDisabled13 = true
          this.shouldDisabled14 = false
          // console.log('按钮是否禁用5')
        }
      }
      // }

      // 复审阶段判断
      if (this.checkingStatusItems[0].statuscn == '待复审') {
        this.shouldDisabled1 = false
        this.shouldDisabled2 = false
        this.shouldDisabled3 = false
        this.shouldDisabled4 = false
        this.shouldDisabled5 = false
        this.shouldDisabled6 = false
        this.shouldDisabled7 = false
        this.shouldDisabled8 = true
        this.shouldDisabled9 = false
        this.shouldDisabled10 = false
        this.shouldDisabled11 = false
        this.shouldDisabled12 = true
        this.shouldDisabled13 = false
        this.shouldDisabled14 = false
        // console.log('按钮是否禁用6')
      } else if (this.checkingStatusItems[0].statuscn == '复审中') {
        if (this.$store.state.user.name != this.qtptdtShDoctor2) {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = false
          this.shouldDisabled12 = false
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          // console.log('按钮是否禁用70')
        } else {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = true
          this.shouldDisabled10 = true
          this.shouldDisabled11 = true
          this.shouldDisabled12 = true
          this.shouldDisabled13 = false
          this.shouldDisabled14 = true
          // console.log('按钮是否禁用7')
        }
      }
      // }
    },

    // 报告提取
    reportExtract(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      // console.log(data)
      teacher.reportExtract(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      // console.log(jsonString)

      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 撤销提取
    revokeExtraction(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.revokeExtraction(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 退回审核/复审
    revokeDoctor() {
      if (this.checkingStatusItems[0].statuscn == '待审核') {
        this.revoke(1)
      } else if (this.checkingStatusItems[0].statuscn == '待复审') {
        this.revoke(2)
      }
    },
    // 撤回
    revoke(backnumber) {
      switch (backnumber) {
        case 0:
          // console.log(0)
          teacher.getPatientPro(this.PtPatientVo2.ptdeId).then(response => {
            const txt = response.data || {}
            console.log(txt)
            this.PtPatientVo2.ptdtBgReadyTxt = txt.ptdtBgReadyTxt
            this.PtPatientVo2.ptdtCheckSjTxt = txt.ptdtCheckSjTxt
            this.PtPatientVo2.ptdtCheckyjTxt = txt.ptdtCheckyjTxt
            this.qtptdtStatus = txt.ptdtStatus
            this.qtptdtBgDoctor = txt.ptdtBgDoctor
            this.qtptdtShDoctor = txt.ptdtShDoctor
            this.qtptdtShDoctor2 = txt.ptdtShDoctor2
            this.checkingStatusItems = this.ptdtStatusList.filter(item => item.status === this.qtptdtStatus)
            this.getList()
          })
          this.getDoctorAndTime(this.PtPatientVo2.ptdeId)

          break
        case 1:
          // console.log(1)
          if (this.checkingStatusItems[0].statuscn == '待审核') {
            // console.log(888)
            var userName1 = this.$store.state.user.name
            const data = {
              id: this.PtPatientVo2.ptdeId,
              name: userName1
            }
            const jsonString = JSON.stringify(data)
            teacher.backCommited(jsonString).then(response => {
              const txt = response.data || {}
              // console.log(txt)
              if (response.code == 200) {
                this.successFeedback(response.msg)
              }
            })
          } else {
            // console.log(123)
          }
          this.backnumber = 0
          setTimeout(() => {
            this.revoke(0)
          }, 100)
          this.shouldShowDemo3 = true
          this.shouldShowDemo30 = false
          break
        case 2:
          console.log(2)
          if (this.checkingStatusItems[0].statuscn == '待复审') {
            // console.log(888)
            var userName1 = this.$store.state.user.name
            const data = {
              id: this.PtPatientVo2.ptdeId,
              name: userName1
            }
            const jsonString = JSON.stringify(data)
            teacher.backCommited2(jsonString).then(response => {
              const txt = response.data || {}
              // console.log(txt)
              if (response.code == 200) {
                this.successFeedback(response.msg)
              }
            })
          } else {
            // console.log(123)
          }
          this.backnumber = 0
          setTimeout(() => {
            this.revoke(0)
          }, 100)
          this.shouldShowDemo3 = true
          this.shouldShowDemo30 = false
          break
      }
      teacher.revoke(data).then(response => {
        const txt = response.data || {}
        console.log(txt)
      })
    },
    // 提交审核
    submitExamine(ptdeId) {
      teacher.updatePatient(this.PtPatientVo2)
        .then(response => {
          this.$message({
            type: 'success',
            message: '保存成功!'
          })
          this.editDialogVisible = false
          this.getList()
        })
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.submitExamine(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      this.backnumber = 1
      this.shouldShowDemo30 = true
      this.shouldShowDemo3 = false
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 审核提取
    reviewExtract(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reviewExtract(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 撤销审核
    revokeReview(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.revokeReview(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 审核通过
    reviewApprove(ptdeId) {
      teacher.updatePatient(this.PtPatientVo2)
        .then(response => {
          this.$message({
            type: 'success',
            message: '保存成功!'
          })
          this.editDialogVisible = false
          this.getList()
        })
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reviewApprove(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 提交复审
    submitReexamine(ptdeId) {
      teacher.updatePatient(this.PtPatientVo2)
        .then(response => {
          this.$message({
            type: 'success',
            message: '保存成功!'
          })
          this.editDialogVisible = false
          this.getList()
        })
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.submitReexamine(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      this.backnumber = 2
      setTimeout(() => {
        this.revoke(0)
      }, 100)
      this.shouldShowDemo30 = true
      this.shouldShowDemo3 = false
    },
    // 复审提取
    reexamineExtract(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reexamineExtract(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 撤销复审
    revokeReexamine(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.revokeReexamine(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 复审通过
    reexamineApprove(ptdeId) {
      teacher.updatePatient(this.PtPatientVo2)
        .then(response => {
          this.$message({
            type: 'success',
            message: '保存成功!'
          })
          this.editDialogVisible = false
          this.getList()
        })
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reexamineApprove(jsonString).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 转审审核医生
    changeReviewer1(name) {
      var userName1 = this.$store.state.user.name
      console.log(name)
      console.log(userName1)
      const data = {
        id: this.PtPatientVo2.ptdeId,
        name: userName1,
        zsshname: name
      }
      console.log(data)
      teacher.changeReviewer1(data).then(response => {
        const txt = response.data || {}
        // console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 转审复审医生
    changeReviewer2(name) {
      var userName1 = this.$store.state.user.name
      // console.log(name)
      // console.log(userName1)
      const data = {
        id: this.PtPatientVo2.ptdeId,
        name: userName1,
        zsshname2: name
      }
      // console.log(data)
      teacher.changeReviewer2(data).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    }

  }
}
</script>
<style lang="scss" scoped>
$border: 1px solid #ececec;

* {
  margin: 0;
  padding: 0;
}

div {
  box-sizing: border-box;
}

.edit {
  box-sizing: border-box;
  margin: 0px auto;
  display: flex;

  //左边
  .patient-left {
    // display: block;
    width: 1200px;
    box-sizing: border-box;
    padding: 0 10px;
    width: calc(100% - 300px); /*左侧初始化宽度*/
    height: 100%;
    float: left;

    .patient-message {
      //左边头部
      width: 95%;
      height: 160px;
      margin-left: 20px;
      display: flex;
      flex-wrap: wrap;
      justify-content: start;
      align-items: center;
      border-radius: 15px;
      background: #e5f5ff;
      //box-shadow: 7px 7px 15px #bebebe, -3px -3px 7px #ffffff;
      // border: 1px groove rgba(150, 215, 255, 0.242);
      border: $border;
      padding: 18px 15px;
      box-sizing: border-box;

      div {
        padding: 0px 15px;

        .el-input__inner {
          padding: 0px 0px;
        }
      }
    }

    .patient-content {
      margin-left: 20px;
      margin-top: 15px;
      width: 95%;
      border: 1px solid #ececec;
      background: #ffffff;
      //box-shadow: 7px 7px 15px #bebebe, -7px -7px 15px #ffffff;

      .patient-contentbox {
        height: 100%;
        margin: 15px;
        // box-shadow: 4px 4px 25px 2px rgba(156, 152, 152, 0.308);
        overflow-y: auto;

        ::v-deep .el-textarea__inner {
          // background-color: rgba(150, 215, 255, 0.242);
          //box-shadow: 7px 7px 15px #bebebe;
          backdrop-filter: blur(7px);
          border-radius: 15px;
          background: #ffffff;

          transition: all 0.3s;
          cursor: pointer;
        }
      }

      .btn {
        text-align: center;
        height: 72px;
        line-height: 72px;
      }
    }

  }

  .bingshi,
  .suojian,
  .yijian {
    border: $border;
    margin-top: 10px;

    .title {
      background-color: #e5f5ff;
      height: 50px;
      line-height: 50px;
      padding-left: 20px;
      font-weight: bold;
      font-size: 18px;
      border-bottom: $border;
      margin: 3px 0px;
    }

    :deep(textarea) {
      border: none;
    }
  }
}

.patient-right {
  // width: 750px;

  // background-color: #ffffff;
  // border: $border;
  // padding: 10px;
  // backdrop-filter: blur(7px);
  // background-color: rgba(255, 255, 255, 0.5);
  // background: #ffffff;
  // box-shadow: 7px 7px 15px #bebebe, -7px -7px 8px #ebe7e7;

  float: left;
  height: calc(100% + 130px);
  // width: 300px;
  background-color: #ffffff;
  border: $border;
  padding: 10px;
  backdrop-filter: blur(7px);
  background-color: rgba(255, 255, 255, 0.5);
  background: #ffffff;
  box-shadow: 7px 7px 15px #bebebe, -7px -7px 8px #ebe7e7;
}
</style>
<style>
.custom-dialog {
  background-color: #F5F7FA;
  left: 100px;
  top: -6vh;
  width: 1450px;

}

.el-dialog__header {
  border-bottom: 3px solid #e3e8ee;
  background-color: #E5F5FF;

  font-size: 20px;

}

.app-container {
  height: 900px;
}

.app-container1 {
  height: 900px;
  background-color: #ffffff;
}

.contents {
  width: 493px;
  height: 780px;
}

.texta {
  width: 100%;
  /* 让文本区域宽度占满其容器 */
  display: flex;
  justify-content: center;
  align-items: center;
}

.left-aligned-label .el-input,
.left-aligned-label .el-select {
  width: 100%;
  /* 确保元素占满其父容器的宽度 */
}

.left-aligned-label .el-form-item__label {
  text-align: right;
  padding: 0px 0px;
}

.left-aligned-label .el-form-item__content {
  align: left;
  justify-content: left;

}

/* el-ui 状态选择样式 */

/* 第一部分：（初始状态） */
.el-table .initial-row {
  background: #fcfeff;
}

/* 第二部分：（学生） */
.el-table .reports-row {
  background: #E7FAF0;
}

/* 第三部分：（医师） */
.el-table .audit-ing-row {
  background: #E8F4FF;
}

/* 第三部分结束 */
.el-table .audit-end-row {
  background: #d6e7f8;
}

/* 第四部分：（主任或医师） */
.el-table .review-ing-row {
  background: #FFEDED;
}

/* 第四部分结束 */
.el-table .review-end-row {
  background: #fed2d2;
}

/* 2023/05/16 el-col 实现右对齐 */
/* .flex-end {
  display: flex;
  justify-content: end;
  flex-flow: row wrap;
} */

/* 2023/05/19  */
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 208px;
}

/* 2023/5/28 */
.flex-item {
  display: flex;
  align-items: center;
}

.class-info {
  display: flex;
}

.select-class {
  width: 120px;
  height: 500px;
  overflow: auto;
}

.select-class .el-radio-button {
  display: block;
  width: 120px !important;
}

.select-class .el-radio-button__inner {
  width: inherit !important;
  border: 1px !important;
  border-radius: 4px !important;
}

.student-info {
  flex: 1;
  height: 500px;
  overflow: auto;
  margin-left: 10px;
  border-radius: 4px;
  border: 1px solid #cccccc;
}

.contents {
  min-height: 300px;
}

.show {
  visibility: hidden;
}

.text {
  font-size: 14px;
}

.item {
  padding: 18px 0;
}

/* .box-card {
        width: 600px;
    }  */

.divcss5 {
  width: 100%;
  padding: 15px;
  min-height: 800px;
  border: 1px solid #DCDFE6;
}

.rightCell {
  margin-top: 50px;
}

/* .el-tabs {
  margin-top: -14px;
} */

/* 禁止换行 */
.el-table .cell {
  white-space: nowrap;
  /* word-wrap: break-word;
  word-break: break-all; */
}

.rightCell {
  margin-left: 10px;
  border: 1px solid #DCDFE6;
  padding: 15px 0px;
  min-height: 100vh;
}

/*.el-textarea__inner {
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 7px 7px 15px #bebebe,
    -7px -7px 15px #ffffff;
}*/

/*.el-textarea__inner:hover{
  box-shadow: 35px 35px 68px 0px rgba(24, 144, 255, 0.5);
}

.el-textarea__inner:active {
  transform: scale(0.95);
  border: 1px solid rgb(24, 144, 255)  ;
}*/
/*.el-input__inner {
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 3px 3px 5px #bebebe,
    -5px -5px 5px #ffffff;
}*/

/*.el-input__inner:hover{
  box-shadow: 35px 35px 68px 0px rgba(24, 144, 255, 0.5);
}

.el-input__inner:active {
  transform: scale(0.65);
  border: 1px solid #1890ff;
}*/
.el-dialog {
  background-color: #F5F7FA;
}

.student-info {
  border-radius: 5px;
  padding: 40px;
  background: #ffffff;
  box-shadow: 3px 3px 5px #bebebe,
  -5px -5px 5px #ffffff;
}

.checkbox-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.checkbox-container .el-checkbox:first-child {
  margin-left: 10px;
  /* 第一个复选框添加左边间距 */
}

.checkbox-container .el-checkbox {
  width: calc(33.33% - 5px);
  /* 调整宽度以适应每行三个，减去间距 */
  margin-bottom: 10px;
  box-sizing: border-box;
}

.span1 {
  margin-right: 20px;
}

.kejian {
  border: 1px;
  display: flex;
  align-items: center;
  border-radius: 5px;
  margin-top: 20px;
  padding: 10px 20px;
  background: #ffffff;
  box-shadow: 3px 3px 5px #bebebe,
  -5px -5px 5px #ffffff;
}

.bold-blue {

  color: #373738;
  font-size: 16px;
}

/* 隐藏全选按钮 */
.el-table__header .el-checkbox {
  /* display: none; */
}

/* 新添加的css样式 2023/12.22 */
.demo-form-inline {
  background-color: #e1effc;
}

.my-report {
  height: 27px;
  width: 60px;
}

.btn-el {
  background-color: #cfdff3;
}

.el-container {
  background-color: #e2eefc;
}

.aside_1 {
  background-color: #e2eefc;
  /* display: flex; */
  align-items: center;
}

.aside_1 .button1 {
  margin-left: 10px;
}

.aside_1 button {
  background-color: #e2eefc;
  margin: 1px;
}

.el-aside {
  padding: 0;
  background-color: #e2eefc;
}

.aside_2 {
  background-color: #ffffff;
}

.text-item {
  background-color: #ffffff;
  height: 195px;
}

.tab-content {
  display: none;
  border-top: 1px solid #85a1cb;
  /* 使上边框不显现 */
  border: none;
}

.tab-content.active {
  display: block;
}

.tabs button.active {
  background-color: #e9f1fb;
  color: black;
  border: 0.1px solid #85a1cb;
  border-radius: 5px;
  border-bottom: none;
  margin-bottom: -1px;
  /* 使底部边框不显现 */
}

.sbutton {
  background-color: #e3eefd;
  color: #85a1cb;
  height: 28.5px;
  width: 48px;
  border: none;
}

.tab1-content {
  display: none;
  border-top: 1px solid #85a1cb;
  /* 使上边框不显现 */
  border: none;
}

.tab1-content.active {
  display: block;
}

.tabs1 button.active {
  background-color: #e9f1fb;
  color: black;
  border: 0.1px solid #85a1cb;
  border-radius: 5px;
  border-bottom: none;
  margin-bottom: -1px;
  /* 使底部边框不显现 */
}

.sbutton1 {
  margin-top: 3px;
  background-color: #e3eefd;
  color: #85a1cb;
  height: 24px;
  width: 63px;
  border: none;
  font-size: small;
}

.otherlisth {
  height: 100%;
  float: left;
  background-color: #e3eefd;
  margin-left: 30px;
}

.otherlist1 {
  display: none;
}

.otherlist {
  display: block;
  font-size: small;
  text-align: center;
  height: 22px;
}

.otherlist:hover {
  background-color: #fbd659;
}

.otherlisth:hover .otherlist1 {
  display: block;
}

.el-tabs__header {
  margin: 0;
}

.el-dropdown-link {
  cursor: pointer;
  color: black;
}

.el-icon-arrow-down {
  font-size: 12px;
}

.el-tabs--border-card > .el-tabs__content {
  padding: 0px;
  padding-left: 2px;
  padding-right: 2px;
}

/* .app-wrapper.hideSidebar{
  background-color: #e3eefd;
}
.app-container{
  background-color: #e3eefd;
} */
.el-tabs__content {
  background-color: #e3eefd;
}

.el-input--medium .el-input__inner {
  height: 28.5px;
  line-height: 36px;
}

.image-container {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.image-container img {
  width: 50%;
  margin: 5px;
  border: 2px solid red;
}

.el-image {
  width: 30%;
  margin: 5px;
}

.elimg {
  margin: 5px;
}

.highlight {
  border: 2px solid red;
  /* 根据需要自定义高亮样式 */
}

.selected1 {
  border: 2px solid red;
}

.ql-editor {
  height: 200px;
  overflow-y: hidden;
    background-color: #FFFFFF;
}

#el-input__inner1 {
  float: left;

  border: 0.1px solid;
  width: 85px;
  height: 21px;

}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.box-card {
  width: 480px;
}

.no-inherit {
  margin: initial !important;
  padding: initial !important;
}

.resize2 {
  cursor: col-resize;
  float: left;
  position: relative;
  top: 15%;
  background-color: #d6d6d6;
  border-radius: 5px;
  margin-top: -10px;
  width: 10px;
  height: 50px;
  background-size: cover;
  background-position: center;
  /*z-index: 99999;*/
  font-size: 32px;
  color: white;
}

.resize2:hover {
  color: #444444;
}

.box {
  width: 800px;
  height: 100%;
  margin: 1% 0px;
  overflow: hidden;
  box-shadow: -1px 9px 10px 3px rgba(0, 0, 0, 0.11);
}

.select {
  width: 150px;
  margin: 0 10px;
}

.table-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  height: 60px;
}

.container-parent {
  width: 100%;
  //background-color: red;
  height: 850px;
  overflow: hidden;
  //padding-right: 10%;
//position: absolute;
}

.container-parent-left {
width: calc(100% - 30%);  /*左侧初始化宽度*/
  height: 100%;
  //background: green;
  float: left;
}

/*拖拽区div样式*/
.resize {
  cursor: col-resize;
  float: left;
  position: relative;
  top: 50%;
  background-color: #d6d6d6;
  border-radius: 5px;
  margin-top: -10px;
  width: 10px;
  height: 50px;
  background-size: cover;
  background-position: center;
  /*z-index: 99999;*/
  font-size: 32px;
  color: white;
}

/*拖拽区鼠标悬停样式*/
.resize:hover {
  color: #444444;
}

.container-parent-right {
  float: left;
  width: 29%; /*右侧初始化宽度*/
  //height: 100%;
  background: #fff;
  box-shadow: -1px 4px 5px 3px rgba(0, 0, 0, 0.11);
}

.resize1 {
    width: 50px;
    height: 10px;
    position: relative;
    background-position: center;
    border-radius: 5px;
    cursor: row-resize;
    left: 45%;
    background-color: #d6d6d6;
    font-size: 20px;
    color: white;
    padding-left: 10px;
    padding-bottom: 20px;
  }

  .resize1:hover {
    color: #444444;
  }

  /* .container-parent1 {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
} */

.container-parent-top {
  /* overflow:scroll; */
  flex: 0 1 300px;
  width: 400px;
}
/*
  .container-parent-bottom {
  flex: 1;
  display: flex;
  position: relative;
} */

/* 富文本编辑器 */
.ql-toolbar {
  position: relative;
  top: -22px;
  z-index: 1;
  /* display: flex;
  align-items: center;
  justify-content: flex-start; */
}
 .ql-toolbar.ql-snow .ql-formats{
  margin-right: 0px;
}
.ql-snow.ql-toolbar button, .ql-snow .ql-toolbar button {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    float: left;
    height: 24px;
    padding: 3px 5px;
    width: 21px;
}
.ql-container{
  position: relative;
  top: -22px;
  overflow: auto;
}

/* 提取医生时间 */
.el-dropdown-link {
    cursor: pointer;
    color: #606266;
}
.el-card__body {
    padding: 0px;
}
.item {
    padding: 0px;
    margin-bottom: 24px;
}

.el-textarea__inner{
  min-height: 25px;
  height: 134px;
  resize: none; /* 禁用调整大小 */
  overflow: auto; /* 添加滚动条 */
}

.dagInput {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .interInput {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
  }

  .input-field {
    width: 100%;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .input-field::placeholder {
    color: #aaa;
  }

  .button-container {
    display: flex;
    gap: 12px; /* 增加按钮之间的间距 */
    margin-top: 16px; /* 增加顶部间距 */
  }

  .action-button {
    padding: 8px 16px; /* 调整按钮内边距 */
    border-radius: 4px; /* 圆角按钮 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
  }

  .content-container {
    border: 1px solid #c4d9f3; /* 使用较宽的边框 */
    border-radius: 8px; /* 圆角边框 */
    height: 770px; /* 固定高度 */
    margin: 16px 0; /* 上下边距 */
    background-color: #fff; /* 背景颜色 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    padding: 16px; /* 内边距 */
  }

  .button-container {
  margin: 10px;  /* 添加外边距 */
}

.action-button {
  margin: 5px;  /* 添加按钮间距 */
}


.button-container {
  margin: 10px;
  display: flex;
  justify-content: center;
}

.unique-dialog-style {
  .el-dialog__header {
    background-color: #e0f7fa; /* 更柔和的背景色 */
    color: #00796b; /* 标题颜色 */
  }

  .el-input__inner {
    border: 1px solid #80deea; /* 调整输入框边框颜色 */
    border-radius: 8px; /* 圆角 */
  }

  .unique-footer-style {
    padding: 15px; /* 调整底部按钮的间距 */
    text-align: right; /* 右对齐 *{
    background-color: #ffffff; /* 自定义取消按钮的颜色 */
    color: #00796b; /* 自定义文字颜色 */
    border: 1px solid #80deea; /* 添加边框 */
  }

  .unique-confirm-button {
    margin-left: 10px; /* 确认按钮左侧增加间距 */
    background-color: #00796b;
    color: #ffffff; /* 确认按钮文字颜色 */
    border-radius: 4px; /* 圆角 */
  }
}

.input-container {
  flex-grow: 1; /* 使输入框容器扩展以填充可用空间 */
  display: flex;
}

.resizable-input {
  flex-grow: 1; /* 使输入框扩展以填充容器 */
  min-height: 100px; /* 设置最小高度以确保有足够的空间 */
  resize: vertical; /* 允许用户仅在垂直方向上调整大小 */
}

.btn-el {
  padding: 8px 16px;
  background-color: #409EFF; /* Element Plus的主要颜色 */
  color: white;
  border: none;
  border-radius: 4px;
}

</style>
